-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
85 lines (71 loc) · 2.53 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
80
81
82
83
84
85
from setuptools import setup, find_packages
from collections import defaultdict
from typing import List, DefaultDict
import re
VERSIONFILE = "nblast/__version__.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
extras_require: DefaultDict[str, List[str]] = defaultdict(list)
install_requires: List[str] = []
reqs = install_requires
with open("requirements.txt") as f:
for line in f:
if line.startswith("#extra: "):
extra = line[8:].split("#")[0].strip()
reqs = extras_require[extra]
elif not line.startswith("#") and line.strip():
reqs.append(line.strip())
dev_only = ["test-notebook", "dev"]
specialized = ['r']
all_dev_deps = []
all_deps = []
for k, v in extras_require.items():
if k in specialized:
continue
all_dev_deps.extend(v)
if k not in dev_only:
all_deps.extend(v)
extras_require["all"] = all_deps
extras_require["all-dev"] = all_dev_deps
with open("README.md") as f:
long_description = f.read()
setup(
name='nblast',
version=verstr,
packages=find_packages(include=["nblast", "nblast.*"]),
license='GNU GPL V3',
description='NBLAST implementation optimized for large data sets',
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/navis-org/navis-nblast-large',
project_urls={
"Documentation": "https://github.com/navis-org/navis-nblast-large",
"Source": "https://github.com/navis-org/navis-nblast-large",
},
author='Philipp Schlegel',
author_email='pms70@cam.ac.uk',
keywords='Neuron Analysis Anatomy navis',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
install_requires=install_requires,
extras_require=dict(extras_require),
tests_require=extras_require["dev"],
# CI runs against >=3.7
# but R-Python interface ships with 3.6 so this is necessary
python_requires='>=3.6',
zip_safe=False,
include_package_data=True
)