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

try:
8 9 10 11
    install_reqs = parse_requirements(
        "requirements.txt", session=pip.download.PipSession())
    test_reqs = parse_requirements(
        "test-requirements.txt", session=pip.download.PipSession())
12 13 14
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
15

16 17
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
18

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
23
    version=__version__,
24 25 26
    description=('A sentiment analysis server implementation. '
                 'Designed to be extensible, so new algorithms '
                 'and sources can be used.'),
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
27 28
    author='J. Fernando Sanchez',
    author_email='balkian@gmail.com',
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
29
    url='https://github.com/gsi-upm/senpy',  # use the URL to the github repo
30 31
    download_url='https://github.com/gsi-upm/senpy/archive/{}.tar.gz'.format(
        __version__),
32
    keywords=['eurosentiment', 'sentiment', 'emotions', 'nif'],
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
33
    classifiers=[],
34 35
    install_requires=install_reqs,
    tests_require=test_reqs,
36
    setup_requires=['pytest-runner', ],
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
37 38 39 40 41
    extras_require={
        'evaluation': [
            'gsitk'
        ]
    },
42
    include_package_data=True,
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
43
    entry_points={
44 45 46
        'console_scripts':
        ['senpy = senpy.__main__:main', 'senpy-cli = senpy.cli:main']
    })