-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.py
More file actions
89 lines (76 loc) · 2.98 KB
/
setup.py
File metadata and controls
89 lines (76 loc) · 2.98 KB
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
"""
~~~ Recon3D ~~~
Python-based routine for reconstructing 3D
displacement (velocity) fields from multiple
interferograms acquired from various angles
Copyright (C) 2013 Brent M. Minchew
--------------------------------------------------------------------
GNU Licensed
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------
"""
import sys,os
# Version info
MAJOR = 0
MINOR = 2
MICRO = 0
ISRELEASED = True
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
requirements = ['numpy', 'scipy']
def write_version_py(filename='recon3d/version.py'):
cnt = '"""' + __doc__
cnt += ' ** This file was generated by the root setup.py\n' + '"""'
cnt += """
\nversion = '%(version)s'
"""
FULLVERSION = VERSION
a = open(filename, 'w')
try:
a.write(cnt % {'version': VERSION,
'full_version' : FULLVERSION,
'isrelease': str(ISRELEASED)})
finally:
a.close()
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.add_subpackage('recon3d')
config.add_scripts('recon3d/recon3d_driver.py',
'recon3d/recon3d_parallel.py')
config.get_version('recon3d/version.py')
return config
def setup_package():
from distutils.dir_util import remove_tree
from numpy.distutils.core import setup
write_version_py()
if os.path.exists('./build'):
remove_tree('./build')
setup(name='recon3d',
author='Brent Minchew',
author_email='bminchew@caltech.edu',
description='\n'.join(__doc__.split('\n')[:1]),
license = 'GNU',
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Programming Language :: Fortran',
'Programming Language :: Python',
'Operating System :: OS Independent',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering'],
configuration=configuration)
if __name__ == '__main__':
setup_package()