-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
72 lines (57 loc) · 1.92 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
from pathlib import Path
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
def strip_comments(l):
return l.split('#', 1)[0].strip()
def _pip_requirement(req, *root):
if req.startswith('-r '):
_, path = req.split()
return reqs(*root, *path.split('/'))
return [req]
def _reqs(*f):
path = (Path.cwd() / 'requirements').joinpath(*f)
with path.open() as fh:
reqs = [strip_comments(l) for l in fh.readlines()]
return [_pip_requirement(r, *f[:-1]) for r in reqs if r]
def reqs(*f):
return [req for subreq in _reqs(*f) for req in subreq]
install_requires = reqs('base.txt')
test_requires = reqs('test.txt') + install_requires
setup(
author="Carlo Mazzaferro",
author_email='carlo.mazzaferro@gmail.com',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Natural Language :: English',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
description="Serve your models with confidence",
entry_points={
'console_scripts': [
'racket=racket.main:cli',
],
},
install_requires=install_requires,
extras_require={'gpu': 'tensorflow-gpu==1.11.0'},
license="GNU General Public License v3",
long_description=readme + '\n\n' + history,
include_package_data=True,
keywords='racket',
name='racket',
packages=find_packages(include=['racket']),
setup_requires=install_requires,
test_suite='tests',
tests_require=test_requires,
url='https://github.com/carlomazzaferro/racket',
version='0.3.9',
zip_safe=False,
)