-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
96 lines (82 loc) · 2.5 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
86
87
88
89
90
91
92
93
94
95
96
import os
import sys
from distutils.core import setup
from setuptools import find_packages
"""
To re-setup:
python setup.py sdist bdist_wheel
pip install -r requirements.txt --process-dependency-links
To test on test pypi:
twine upload --repository testpypi dist/*
# test upload
pip install -i https://test.pypi.org/simple/ --no-deps neuroimgpipe
twine upload dist/*
"""
PACKAGE_NAME = "seek"
with open(os.path.join('seek', '__init__.py'), 'r') as fid:
for line in (line.strip() for line in fid):
if line.startswith('__version__'):
version = line.split('=')[1].strip().strip('\'').strip('"')
break
if version is None:
raise RuntimeError('Could not determine version')
DESCRIPTION = "Neuroimaging Pipeline software for easily generating anatomical interpretations of iEEG data."
URL = "https://github.com/ncsl/seek/"
MINIMUM_PYTHON_VERSION = 3, 6 # Minimum of Python 3.6
REQUIRED_PACKAGES = [
"numpy>=1.14.5",
"scipy>=1.1.0",
"pandas>=1.0.3",
"xlrd",
"natsort",
"nibabel",
"nilearn",
"dicom2nifti",
"snakemake>=5.27.4",
"mne>=0.21.0",
"mne-bids>=0.5",
"pybv>=0.4.0",
"pybids>=0.10",
"seek-localize"
]
CLASSIFICATION_OF_PACKAGE = [
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 3 - Alpha",
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation",
"Natural Language :: English",
]
AUTHORS = [
"Adam Li",
"Chester Huynh",
"Christopher Coogan",
]
def check_python_version():
"""Exit when the Python version is too low."""
if sys.version_info < MINIMUM_PYTHON_VERSION:
sys.exit("Python {}.{}+ is required.".format(*MINIMUM_PYTHON_VERSION))
check_python_version()
setup(
name=PACKAGE_NAME,
version=version,
description=DESCRIPTION,
author=AUTHORS,
long_description=open("README.rst").read(),
url=URL,
license="GNU General Public License (GPL)",
packages=find_packages(exclude=["tests"]),
project_urls={
"Documentation": URL + "doc/",
"Source": URL,
"Tracker": URL + "issues",
},
install_requires=REQUIRED_PACKAGES,
include_package_data=True,
classifiers=CLASSIFICATION_OF_PACKAGE,
)