forked from AllenInstitute/neuron_morphology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·80 lines (70 loc) · 2.87 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
from setuptools import setup, find_packages
from distutils.cmd import Command
import glob
import os
version_path = os.path.join(
os.path.dirname(__file__),
"neuron_morphology",
"VERSION.txt"
)
with open(version_path, "r") as version_file:
version = version_file.read().strip()
readme_path = os.path.join(
os.path.dirname(__file__),
"README.md"
)
with open(readme_path, "r") as readme_file:
readme = readme_file.read()
class CheckVersionCommand(Command):
description = (
"Check that this package's version matches a user-supplied version"
)
user_options = [
('expected-version=', "e", 'Compare package version against this value')
]
def initialize_options(self):
self.package_version = version
self.expected_version = None
def finalize_options(self):
assert self.expected_version is not None
if self.expected_version[0] == "v":
self.expected_version = self.expected_version[1:]
def run(self):
if self.expected_version != self.package_version:
raise ValueError(
f"expected version {self.expected_version}, but this package "
f"has version {self.package_version}"
)
setup(
version=version,
name="neuron-morphology",
author="Allen Institute for Brain Science",
author_email="[email protected]",
packages=find_packages(),
include_package_data=True,
description="Tools for working with single-neuron morphological reconstructions",
long_description=readme,
long_description_content_type='text/markdown',
entry_points={
"console_scripts": [
"feature_extractor = neuron_morphology.feature_extractor.__main__:main",
"layered_point_depths = neuron_morphology.layered_point_depths.__main__:main",
"snap_polygons = neuron_morphology.snap_polygons.__main__:main",
"apply_affine_transform = neuron_morphology.transforms.affine_transformer.apply_affine_transform:main",
"pia_wm_streamlines = neuron_morphology.transforms.pia_wm_streamlines.calculate_pia_wm_streamlines:main",
"upright_angle = neuron_morphology.transforms.upright_angle.compute_angle:main",
"validate_reconstruction = neuron_morphology.validation.validate_reconstruction:main"
]
},
keywords=["neuroscience", "bioinformatics", "scientific"],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: Other/Proprietary License", # Allen Institute Software License
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering :: Bio-Informatics"
],
cmdclass={'check_version': CheckVersionCommand}
)