forked from gouwens/ipfx
-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
76 lines (65 loc) · 2.46 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
import os
from setuptools import setup, find_packages
from distutils.cmd import Command
import glob
with open("requirements.txt", "r") as requirements_file:
required = requirements_file.read().splitlines()
version_file_path = os.path.join(
os.path.dirname(__file__),
"ipfx",
"version.txt"
)
with open(version_file_path, "r") as version_file:
version = version_file.readline().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(
name='IPFX',
version=version,
description="""Intrinsic Physiology Feature Extractor (IPFX) - tool for computing neuronal features from the intracellular electrophysiological recordings""",
long_description=readme,
long_description_content_type='text/markdown',
author="Allen Institute for Brain Science",
author_email="Marmot@AllenInstitute.onmicrosoft.com",
url="https://github.com/AllenInstitute/ipfx",
packages=find_packages(exclude=["tests", "tests.*"]),
install_requires=required,
python_requires = '>=3.6',
include_package_data=True,
setup_requires=['pytest-runner'],
keywords=["neuroscience", "bioinformatics", "scientific"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: Other/Proprietary License", # Allen Institute Software License
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6",
"Topic :: Scientific/Engineering :: Bio-Informatics"
],
cmdclass={'check_version': CheckVersionCommand}
)