-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
46 lines (32 loc) · 1.01 KB
/
setup.py
File metadata and controls
46 lines (32 loc) · 1.01 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
from numpy.distutils.core import Extension, setup
sourcePath = 'source/'
f77CompileArgs = ['-std=legacy', '-fno-automatic', '-O', '-w']
# Quasi-dipole magnetic field-line
#
sources1 = []
for tmp in ['apex.pyf', 'apex.f', 'magfld.f']:
sources1.append(sourcePath + tmp)
ext1 = Extension( name='apex', \
sources=sources1, \
extra_f77_compile_args=f77CompileArgs \
)
# Geodetic to Quasi-dipole to coordinates or viceversa
#
sources3 = []
for tmp in ['apexqd2gd.pyf', 'qd2gdcoord.f90', 'apexsh.f90']:
sources3.append(sourcePath + tmp)
ext3 = Extension( name='apexqd2gd', \
sources=sources3, \
extra_f77_compile_args=f77CompileArgs \
)
if __name__ == '__main__':
setup( name='pyapex', \
version='0.1.0', \
author='Ronald Ilma', \
author_email='rri5@cornell.edu', \
description='Apex Model Apps', \
packages=['pyapex'], \
ext_package='pyapex', \
ext_modules=[ ext1, ext3 ], \
data_files=[('pyapex', [sourcePath + 'apexsh.dat'])], \
)