-
Notifications
You must be signed in to change notification settings - Fork 49
/
setup.py
79 lines (67 loc) · 2.35 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
from codecs import open
from os import path
from pip._internal.req import parse_requirements
from pip._internal.network.session import PipSession
from setuptools import setup, dist
dist.Distribution().fetch_build_eggs(['numpy>=1.11.2'])
try:
import numpy as np
except ImportError:
exit('Please install numpy>=1.11.2 first.')
try:
from Cython.Build import cythonize
from Cython.Distutils import build_ext
except ImportError:
USE_CYTHON = False
else:
USE_CYTHON = True
__version__ = '1.0.0'
here = path.abspath(path.dirname(__file__))
# Get the long description from README.md
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
# get the dependencies and installs
# parse_requirements() returns generator of pip._internal.req.req_file.ParsedRequirement objects
session = PipSession()
install_reqs = parse_requirements('requirements.txt', session=session)
# reqs is a list of requirement
reqs = [str(ir.requirement) for ir in install_reqs]
ext = '.pyx' if USE_CYTHON else '.c'
cmdclass = {}
ext = '.pyx' if USE_CYTHON else '.c'
setup(
name='elliot',
version=__version__,
author='',
author_email='',
maintainer='sisnflab',
maintainer_email='',
license='Apache License',
packages=['elliot'],
platforms=['all'],
description=(
'A Comprehensive and Rigorous Framework for Reproducible Recommender Systems Evaluation'),
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/sisnflab/elliot',
keywords='recommender recommendation system evaluation framework',
cmdclass=cmdclass,
install_requires=reqs,
classifiers=[
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache License',
'Programming Language :: Python',
'Programming Language :: Python :: Implementation',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Software Development :: Libraries'
]
)
# how to send a package
# 1. python setup.py sdist build / python setup.py bdist_wheel --universal
# 2. pip install twine
# 3. twine upload dist/*