-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
64 lines (58 loc) · 1.97 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
from numpy.distutils.core import setup, Extension
import re
# Version code from https://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package
VERSIONFILE = "pyQuickBeam/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
######################
# FORTRAN code setup #
######################
f90_args = ['-fPIC', '-O']
wrappers = [
Extension(
'radsim',
sources=['src/radsim.pyf',
'src/math_lib.f90',
'src/dsd.f90',
'src/array_lib.f90',
'src/gases.f90',
'src/optical_sphere.f90',
'src/optics_lib.f90',
'src/zeff.f90'],
libraries=['math_lib',
'array_lib',
'm_mrgrnk'],
extra_f90_compile_args=f90_args),]
setup(
name='pyQuickBeam',
version=verstr,
author='Edward Gryspeerdt',
author_email='[email protected]',
maintainer='Edward Gryspeerdt',
maintainer_email='[email protected]',
description='A simple python interface/wrapper for the QuickBeam radar simulator',
license='Quickbeam license',
url='https://github.com/EdGrrr/pyQuickBeam',
install_requires=['numpy'],
packages=['pyQuickBeam'],
package_data = {'pyQuickBeam': ['data/*']},
libraries = [
('m_mrgrnk', dict(
sources=['src/m_mrgrnk.f90'],
extra_f90_compile_args=f90_args)),
('array_lib', dict(
sources=['src/array_lib.f90',
'src/m_mrgrnk.f90'],
extra_f90_compile_args=f90_args)),
('math_lib', dict(
sources=['src/math_lib.f90',
'src/m_mrgrnk.f90'],
extra_f90_compile_args=f90_args)),
],
ext_modules = wrappers
)