forked from trislett/TFCE_mediation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
72 lines (60 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
import os
import sys
from distutils.command.sdist import sdist
from setuptools import setup
PACKAGE_NAME = "tfce_mediation"
BUILD_REQUIRES = ["numpy", "scipy", "matplotlib", "nibabel", "cython", "scikit-learn", "scikit-image", "joblib", "pandas", "tqdm"]
CLASSIFIERS = ["Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Medical Science Apps."]
def parse_setuppy_commands():
info_commands = ['--help-commands', '--name', '--version', '-V',
'--fullname', '--author', '--author-email',
'--maintainer', '--maintainer-email', '--contact',
'--contact-email', '--url', '--license', '--description',
'--long-description', '--platforms', '--classifiers',
'--keywords', '--provides', '--requires', '--obsoletes']
info_commands.extend(['egg_info', 'install_egg_info', 'rotate'])
for command in info_commands:
if command in sys.argv[1:]:
return False
return True
def configuration(parent_package = "", top_path = None):
from numpy.distutils.misc_util import Configuration
CONFIG = Configuration(None)
CONFIG.set_options(ignore_setup_xxx_py = True,
assume_default_configuration = True,
delegate_options_to_subpackages = True,
quiet = True)
CONFIG.add_scripts(os.path.join("bin", PACKAGE_NAME))
CONFIG.add_scripts(os.path.join("bin", "tm_tools"))
CONFIG.add_scripts(os.path.join("bin", "tm_maths"))
CONFIG.add_scripts(os.path.join("bin", "tm_multimodal"))
CONFIG.add_scripts(os.path.join("bin", "submit_condor_jobs_file"))
CONFIG.add_subpackage(PACKAGE_NAME)
return CONFIG
cmdclass = {"sdist": sdist}
if os.path.exists('MANIFEST'):
os.remove('MANIFEST')
if parse_setuppy_commands():
from numpy.distutils.core import setup
exec(open('tfce_mediation/version.py').read())
setup(name = PACKAGE_NAME, version = __version__,
maintainer = "Tristram Lett",
maintainer_email = "[email protected]",
description = "TFCE_mediation",
long_description = "Fast regression and mediation analysis of vertex or voxel MRI data with TFCE",
url = "https://github.com/trislett/TFCE_mediation",
download_url = "",
platforms=["Linux", "Solaris", "Mac OS-X", "Unix"],
license = "GNU General Public License v3 or later (GPLv3+)",
classifiers = CLASSIFIERS,
install_requires = BUILD_REQUIRES,
zip_safe=False,
cmdclass = cmdclass,
configuration = configuration
)