-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
34 lines (32 loc) · 1.07 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
#!/usr/bin/env python
import os
import sys
from numpy.distutils.core import setup, Extension
target_prefix = sys.prefix
for i in range(len(sys.argv)):
a = sys.argv[i]
if a == '--prefix':
target_prefix = sys.argv[i+1]
sp = a.split("--prefix=")
if len(sp) == 2:
target_prefix = sp[1]
print('Target is:', target_prefix)
sys.path.insert(0, os.path.join(target_prefix, 'lib', 'python%i.%i' % sys.version_info[:2], 'site-packages'))
import cdat_info
libs_pth = os.path.join(sys.prefix, "lib")
setup(name="cdtime",
description="Time utilities",
version='3.2',
url="http://cdat.sf.net",
packages=['cdtime'],
package_dir={'cdtime': 'Lib'},
include_dirs=['Include', 'Include/py3c'] + cdat_info.cdunif_include_directories,
ext_modules=[
Extension(
'cdtime._cdtime',
['Src/cdtimemodule.c'],
include_dirs=[sys.prefix+'/include'],
library_dirs=[sys.prefix+'/lib'],
libraries=['cdms', 'netcdf', 'grib2c', 'drs', 'png', 'jasper'],
)
])