-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
61 lines (46 loc) · 1.75 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
from os.path import abspath, dirname, join as pjoin
from setuptools import setup, find_packages
root = dirname(abspath(__file__))
def execfile(fname, globs, locs=None):
locs = locs or globs
exec(compile(open(fname).read(), fname, "exec"), globs, locs)
source_path = "src"
packages = find_packages(source_path)
root_packages = [package for package in packages if "." not in package]
assert len(root_packages) == 1
package = root_packages[0]
package_directory = pjoin(root, source_path, package)
def get_variable_from_file(filepath, variable):
filepath_in_package = pjoin(package_directory, filepath)
globs = {}
execfile(filepath_in_package, globs)
variable_value = globs[variable]
return variable_value
version = get_variable_from_file("_version.py", "__version__")
with open("requirements.txt") as f:
required = f.read().splitlines()
required = [requirement for requirement in required if "http" not in requirement]
setup(
name=package,
version=version,
python_requires=">=3.6",
author="Bookla Contributors",
author_email="[email protected]",
description="",
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Programming Language :: Python :: 3.7",
"Topic :: Scientific/Engineering :: Medical Science Apps.",
"Topic :: Scientific/Engineering :: Physics",
"Intended Audience :: Science/Research",
"Intended Audience :: Healthcare Industry",
],
install_requires=required,
packages=packages,
package_dir={"": source_path},
include_package_data=True,
package_data={package: []},
license="AGPL-3.0-or-later",
extras_require={"test": ["pytest"]},
)