forked from FCP-INDI/C-PAC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·100 lines (83 loc) · 2.68 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
97
98
99
100
"""Copyright (C) 2022 C-PAC Developers
This file is part of C-PAC.
C-PAC is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
C-PAC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with C-PAC. If not, see <https://www.gnu.org/licenses/>."""
import os
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration(None, parent_package, top_path)
config.set_options(ignore_setup_xxx_py=True,
assume_default_configuration=True,
delegate_options_to_subpackages=True,
quiet=True)
config.get_version('CPAC/__init__.py')
for root, _, _ in list(os.walk('CPAC')):
if os.path.isfile(os.path.join(root, '__init__.py')):
config.add_subpackage(root)
config.add_data_dir('CPAC/resources')
config.add_define_macros([
"NPY_NO_DEPRECATED_API",
"NPY_1_7_API_VERSION"
])
return config
def main(**extra_args):
from numpy.distutils.core import setup
from glob import glob
from CPAC.info import (
NAME,
MAINTAINER,
MAINTAINER_EMAIL,
DESCRIPTION,
LONG_DESCRIPTION,
URL,
DOWNLOAD_URL,
LICENSE,
CLASSIFIERS,
AUTHOR,
AUTHOR_EMAIL,
PLATFORMS,
VERSION,
REQUIREMENTS,
)
setup(
name=NAME,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
url=URL,
download_url=DOWNLOAD_URL,
license=LICENSE,
classifiers=CLASSIFIERS,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
platforms=PLATFORMS,
version=VERSION,
install_requires=REQUIREMENTS,
configuration=configuration,
scripts=glob('scripts/*'),
entry_points={
'console_scripts': [
'cpac = CPAC.__main__:main'
]
},
package_data={
'CPAC': [
'test_data/*',
'test/templates/*',
'qc/colors/*.txt',
'qc/data/index.html',
]
},
**extra_args
)
if __name__ == "__main__":
main()