forked from chris4540/py-ncepbufr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
26 lines (23 loc) · 1002 Bytes
/
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
from numpy.distutils.core import setup, Extension
import os, sys, subprocess
# build fortran library if it does not yet exist.
if not os.path.isfile('src/libbufr.a'):
strg = 'cd src; sh makebufrlib.sh'
sys.stdout.write('executing "%s"\n' % strg)
subprocess.call(strg,shell=True)
# interface for NCEP bufrlib.
ext_bufrlib = Extension(name = '_bufrlib',
sources = ['src/_bufrlib.pyf'],
libraries = ['bufr'],
library_dirs = ['src'])
if __name__ == "__main__":
setup(name = 'py-ncepbufr',
version = "1.0.0",
description = "Python interface to NCEP bufrlib",
author = "Jeff Whitaker",
author_email = "jeffrey.s.whitaker@noaa.gov",
url = "http://github.com/jswhit/py-ncepbufr",
ext_modules = [ext_bufrlib],
packages = ['ncepbufr'],
scripts = ['utils/prepbufr2nc'],
)