setup.py 1.46 KB
Newer Older
1
from setuptools import setup
2 3 4 5

with open('senpy/VERSION') as f:
    __version__ = f.read().strip()
    assert __version__
6

7

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
8 9 10 11 12 13 14 15 16
def parse_requirements(filename):
    """ load requirements from a pip requirements file """
    with open(filename, 'r') as f:
        lineiter = list(line.strip() for line in f)
    return [line for line in lineiter if line and not line.startswith("#")]


install_reqs = parse_requirements("requirements.txt")
test_reqs = parse_requirements("test-requirements.txt")
17
extra_reqs = parse_requirements("extra-requirements.txt")
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',
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
    extras_require={
38
        'evaluation': extra_reqs
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
39
    },
40
    include_package_data=True,
41
    entry_points={
42 43 44
        'console_scripts':
        ['senpy = senpy.__main__:main', 'senpy-cli = senpy.cli:main']
    })