forked from manoharan-lab/holopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·101 lines (90 loc) · 3.91 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
101
# Copyright 2011-2013, Vinothan N. Manoharan, Thomas G. Dimiduk,
# Rebecca W. Perry, Jerome Fung, and Ryan McGorty, Anna Wang
#
# This file is part of HoloPy.
#
# HoloPy 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.
#
# HoloPy 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 HoloPy. If not, see <http://www.gnu.org/licenses/>.
# Copyright 2013, Vinothan N. Manoharan, Thomas G. Dimiduk, Rebecca
# W. Perry, Jerome Fung, and Ryan McGorty, Anna Wang
#
# This file is part of HoloPy.
#
# HoloPy 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.
#
# HoloPy 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 HoloPy. If not, see <http://www.gnu.org/licenses/>.
'''
setup.py
uses numpy.distutils instead of standard distutils so that we can
build fortran extensions
Notes:
The t-matrix and mie scattering codes require working Fortran 90 and
C compilers, as well as f2py and cython. On Ubuntu, you will need the
"gfortran" and "python-dev" packages installed.
'''
from numpy.distutils.core import setup, Extension
# this will automatically build the scattering extensions, using the
# setup.py files located in their subdirectories
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('',parent_package,top_path)
config.add_subpackage('holopy')
config.add_subpackage('holopy.core')
config.add_subpackage('holopy.core.process')
config.add_subpackage('holopy.core.io')
config.add_subpackage('holopy.core.third_party')
config.add_subpackage('holopy.core.tests')
config.add_subpackage('holopy.propagation')
config.add_subpackage('holopy.propagation.tests')
config.add_subpackage('holopy.scattering')
config.add_subpackage('holopy.scattering.theory')
config.add_subpackage('holopy.scattering.theory.mie_f')
config.add_subpackage('holopy.scattering.scatterer')
config.add_subpackage('holopy.scattering.tests')
config.add_subpackage('holopy.scattering.third_party')
config.add_subpackage('holopy.fitting')
config.add_subpackage('holopy.fitting.tests')
config.add_subpackage('holopy.fitting.third_party')
config.add_subpackage('holopy.vis')
config.add_data_files(['.',['AUTHORS']])
config.add_data_files('holopy/propagation/tests/gold/*.yaml')
config.add_data_files('holopy/scattering/tests/gold/*.yaml')
config.add_data_files('holopy/core/tests/exampledata/*.yaml')
config.add_data_files('holopy/core/tests/exampledata/*.npy')
config.get_version()
return config
__version__ = 'unknown'
try:
from holopy import __version__
except ImportError:
# no version specified, or file got deleted in bzr
pass
if __name__ == "__main__":
setup(configuration=configuration,
name='HoloPy',
version=__version__,
description='Holography in Python',
requires=['numpy', 'scipy', 'PyYAML', 'pillow'],
author='Manoharan Lab, Harvard University',
author_email='vnm@seas.harvard.edu',
url='http://manoharan.seas.harvard.edu/holopy',
package=['HoloPy'])