-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
30 lines (27 loc) · 1.04 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
from distutils.core import setup
from distutils.command.build import build as distbuild
class fortbuild(distbuild):
def run(self):
""" make fortran modules after build """
distbuild.run(self)
import os,subprocess
d=os.getcwd()
print(self.build_lib)
os.chdir(os.path.join(self.build_lib,'ppodd/pod/fortran_modules'))
#environment variables are copied, otherwise the ifort command
#does not exist.
subprocess.call('make', env=os.environ.copy())
os.chdir(d)
setup(name = "ppodd",
version = "003",
description = "Post Processing of Decades Data",
author = "Dave Tiddeman",
author_email = "[email protected]",
url = "http://www.faam.ac.uk",
packages = ['ppodd','ppodd.gui','ppodd.pod'],
package_data = {'ppodd.pod' : ["runmod.so","fortran_modules/*.for","fortran_modules/makefile"] },
#include_package_data=True,
scripts = ["PPODD"],
long_description = """Post-processing of decades data.""",
cmdclass={'build': fortbuild}
)