-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
79 lines (61 loc) · 2.75 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
71
72
73
74
75
76
77
"""
Setup
"""
from __future__ import division, absolute_import, print_function
__author__ = "Andres Perez Hortal"
__copyright__ = "Copyright (c) 2017, Andres A. Perez Hortal, McGill University"
__license__ = "BSD-3-Clause License, see LICENCE.txt for more details"
__email__ = "andresperezcba@gmail.com"
from setuptools import setup, find_packages
from setuptools.extension import Extension
try:
import numpy
except ImportError:
raise RuntimeError( "Numpy required to pior running the package installation\n" +
"Try installing it with:\n" +
"$> pip install numpy" )
try:
from Cython.Build.Dependencies import cythonize
CythonPresent = True
except ImportError:
CythonPresent = False
_thermodynamics_ExtensionArguments = dict(extra_compile_args = ['-fopenmp'],
extra_link_args = ['-fopenmp'] ,
include_dirs=[numpy.get_include()],
language='c++'
)
if CythonPresent:
thermodynamicsLibExtension = Extension( "SkewTplus._thermodynamics",
sources = ['SkewTplus/_thermodynamics.pyx'],
**_thermodynamics_ExtensionArguments)
externalModules = cythonize([thermodynamicsLibExtension])
else:
thermodynamicsLibExtension = Extension( "SkewTplus._thermodynamics",
sources = ['SkewTplus/_thermodynamics.cpp'],
**_thermodynamics_ExtensionArguments)
externalModules = [thermodynamicsLibExtension]
build_requires=['matplotlib','numpy','netCDF4 ']
setup(
name='SkewTplus',
version='1.1.2',
author = "Andres Perez Hortal",
author_email = "andresperezcba@gmail.com",
packages=find_packages(),
ext_modules = externalModules,
url='http://pypi.python.org/pypi/SkewTplus/',
license='LICENSE.txt',
description='Atmospheric Profile Plotting and Diagnostics',
long_description=open('README.rst').read(),
classifiers=[
'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Atmospheric Science',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Cython'],
setup_requires=build_requires,
install_requires=build_requires
)