Repository navigation
Expand file tree
/
Copy pathsetup.py
More file actions
45 lines (39 loc) · 1.82 KB
/
Copy pathsetup.py
File metadata and controls
45 lines (39 loc) · 1.82 KB
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
try:
from setuptools import setup, find_packages
packages = find_packages()
except ImportError:
from distutils import setup
packages = ['pygsw','pygsw/test', 'pygsw/vectors']
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__
gsw_extension = Extension("pygsw.seawater", ["pygsw/seawater.pyx", "pygsw/src/sp_from_c.c"], include_dirs=[np.get_include(), "pygsw/"], libraries=['gswteos-10'] )
ctd_extension = Extension("pygsw.ctd", ["pygsw/ctd.pyx", "pygsw/src/ctd.c"], include_dirs=[np.get_include(), "pygsw/"], libraries=['gswteos-10'] )
pracsal_extension = Extension("pygsw.practical_salinity", ["pygsw/practical_salinity.pyx"], include_dirs=[np.get_include()])
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'''
setup(name = 'pygsw',
version='0.0.11',
description='Python bindings for the TEOS-10 V3.0.3 GSW Oceanographic Toolbox in C',
long_description=open('README.txt').read(),
license='LICENSE.txt',
author='Luke Campbell',
author_email='luke.s.campbell@gmail.com',
url='https://github.com/lukecampbell/pygsw/',
ext_modules=[gsw_extension,ctd_extension,pracsal_extension],
classifiers=classifiers.split('\n'),
packages=packages,
keywords=['oceanography', 'seawater'],
setup_requires=['setuptools_cython'],
)