setup.py 1.49 KB
Newer Older
1
import pip
2
from setuptools import setup
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
3
4
from pip.req import parse_requirements
# parse_requirements() returns generator of pip.req.InstallRequirement objects
5
6
7
8
9
10
11

try:
    install_reqs = parse_requirements("requirements.txt", session=pip.download.PipSession())
    test_reqs = parse_requirements("test-requirements.txt", session=pip.download.PipSession())
except AttributeError:
    install_reqs = parse_requirements("requirements.txt")
    test_reqs = parse_requirements("test-requirements.txt")
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
12
13
14

# reqs is a list of requirement
# e.g. ['django==1.5.1', 'mezzanine==1.4.6']
15
16
install_reqs = [str(ir.req) for ir in install_reqs]
test_reqs = [str(ir.req) for ir in test_reqs]
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
17

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
18
VERSION = "0.4.11"
19

20
setup(
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
21
22
    name='senpy',
    packages=['senpy'],  # this must be the same as the name above
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
23
    version=VERSION,
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
24
    description='''
25
26
27
    A sentiment analysis server implementation. Designed to be \
extendable, so new algorithms and sources can be used.
    ''',
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
28
29
    author='J. Fernando Sanchez',
    author_email='balkian@gmail.com',
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
30
    url='https://github.com/gsi-upm/senpy',  # use the URL to the github repo
31
32
33
    download_url='https://github.com/gsi-upm/senpy/archive/{}.tar.gz'
    .format(VERSION),
    keywords=['eurosentiment', 'sentiment', 'emotions', 'nif'],
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
34
    classifiers=[],
35
36
    install_requires=install_reqs,
    tests_require=test_reqs,
37
    test_suite="nose.collector",
38
    include_package_data=True,
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
39
40
41
42
43
    entry_points={
        'console_scripts': [
            'senpy = senpy.__main__:main'
            ]
        }
44
)