setup.py 1.42 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

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
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")
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
17

18

19
setup(
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
20 21
    name='senpy',
    packages=['senpy'],  # this must be the same as the name above
22
    version=__version__,
23 24 25
    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
26 27
    author='J. Fernando Sanchez',
    author_email='balkian@gmail.com',
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
28
    url='https://github.com/gsi-upm/senpy',  # use the URL to the github repo
29 30
    download_url='https://github.com/gsi-upm/senpy/archive/{}.tar.gz'.format(
        __version__),
31
    keywords=['eurosentiment', 'sentiment', 'emotions', 'nif'],
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
32
    classifiers=[],
33 34
    install_requires=install_reqs,
    tests_require=test_reqs,
35
    setup_requires=['pytest-runner', ],
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
36 37 38 39 40
    extras_require={
        'evaluation': [
            'gsitk'
        ]
    },
41
    include_package_data=True,
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
42
    entry_points={
43 44 45
        'console_scripts':
        ['senpy = senpy.__main__:main', 'senpy-cli = senpy.cli:main']
    })