-
Notifications
You must be signed in to change notification settings - Fork 59
/
setup.py
63 lines (54 loc) · 1.97 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
from setuptools import setup, find_packages
import os
import re
def resolve_requirements(file):
requirements = []
with open(file) as f:
req = f.read().splitlines()
for r in req:
if r.startswith("-r"):
requirements += resolve_requirements(
os.path.join(os.path.dirname(file), r.split(" ")[1]))
else:
requirements.append(r)
return requirements
def read_file(file):
with open(file) as f:
content = f.read()
return content
def find_version(file):
content = read_file(file)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", content,
re.M)
if version_match:
return version_match.group(1)
requirements = resolve_requirements(os.path.join(os.path.dirname(__file__),
'requirements.txt'))
readme = read_file(os.path.join(os.path.dirname(__file__), "README.md"))
license = read_file(os.path.join(os.path.dirname(__file__), "LICENSE"))
shapenet_version = find_version(os.path.join(os.path.dirname(__file__), "shapenet",
"__init__.py"))
setup(
name='shapenet',
version=shapenet_version,
packages=find_packages(),
url='https://github.com/justussschock/shapenet',
author='Justus Schock',
author_email='[email protected]',
description='',
test_suite="pytest",
long_description=readme,
license=license,
install_requires=requirements,
tests_require=["pytest-cov"],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Medical Science Apps."
]
)