-
Notifications
You must be signed in to change notification settings - Fork 35
/
setup.py
70 lines (60 loc) · 2.54 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
65
66
67
68
69
70
from setuptools import setup, find_packages
from distutils.extension import Extension
import numpy as np
# setuptools DWIM monkey-patch madness
# http://mail.python.org/pipermail/distutils-sig/2007-September/thread.html#8204
import sys
if 'setuptools.extension' in sys.modules:
m = sys.modules['setuptools.extension']
m.Extension.__dict__ = m._Extension.__dict__
packages = find_packages()
classifiers = ''' Intended Audience :: Science/Research
Intended Audience :: Developers
Intended Audience :: Education
Operating System :: OS Independent
Programming Language :: Python
Topic :: Scientific/Engineering
Topic :: Education
Topic :: Software Development :: Libraries :: Python Modules'''
qc_extension_sources = ["ion_functions/qc/qc_extensions.pyx",
"extensions/stuck.c",
"extensions/spike.c",
"extensions/gradient.c",
"extensions/utils.c",
"extensions/time_utils.c", ]
qc_extension = Extension("ion_functions.qc.qc_extensions", qc_extension_sources,
include_dirs=[np.get_include(), "extensions/"], libraries=["m"])
wmm_extension_sources = ["ion_functions/data/wmm.pyx",
"extensions/GeomagnetismLibrary.c",
"extensions/wmm.c", ]
wmm_extension = Extension("ion_functions.data.wmm", wmm_extension_sources,
include_dirs=[np.get_include(), "extensions/"], libraries=["m"])
polycals_sources = ["ion_functions/data/polycals.pyx",
"extensions/polycals.c"]
polycals_extension = Extension("ion_functions.data.polycals", polycals_sources,
include_dirs=[np.get_include(), "extensions/"], libraries=["m"])
setup(name='ion-functions',
version='2.1.1',
description='Python Function collection for ION',
long_description=open('README.md').read(),
license='LICENSE.txt',
author='Luke Campbell',
author_email='lcampbell@asascience.com',
url='https://github.com/ooici/ion-functions/',
classifiers=classifiers.split('\n'),
packages=packages,
keywords=['oceanography', 'seawater'],
ext_modules=[qc_extension, wmm_extension, polycals_extension],
setup_requires=['setuptools_cython'],
install_requires=[
'ipython==0.13.0',
'readline',
'numexpr==2.1',
'nose==1.1.2',
'pygsw==0.0.10',
'geomag==0.9',
'scipy==0.11.0',
'cython'
],
include_package_data=True,
)