forked from paudetseis/PlateFlex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
55 lines (51 loc) · 2.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import os.path
import re
from numpy.distutils.core import setup, Extension
from numpy.distutils.system_info import get_info
def find_version(*paths):
fname = os.path.join(os.path.dirname(__file__), *paths)
with open(fname) as fp:
code = fp.read()
match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", code, re.M)
if match:
return match.group(1)
raise RuntimeError("Unable to find version string.")
# ext_cpwt = Extension(name='plateflex.cpwt',
# sources=['src/cpwt/cpwt.f90', 'src/cpwt/cpwt_sub.f90'],
# libraries=['gfortran'],
# library_dirs=get_info('gfortran').get('library_dirs'))
# ext_flex = Extension(name='plateflex.flex',
# sources=['src/flex/flex.f90'],
# libraries=['gfortran'],
# library_dirs=get_info('gfortran').get('library_dirs'))
ext_cpwt = Extension(name='plateflex.cpwt',
sources=['src/cpwt/cpwt.f90', 'src/cpwt/cpwt_sub.f90'])
ext_flex = Extension(name='plateflex.flex',
sources=['src/flex/flex.f90'])
setup(
name='plateflex',
version=find_version('plateflex', '__init__.py'),
description='Python package for estimating lithospheric elastic thickness',
author='Pascal Audet',
maintainer='Pascal Audet',
author_email='[email protected]',
url='https://github.com/paudetseis/PlateFlex',
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
'Programming Language :: Fortran',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8'],
install_requires=['numpy>=1.15', 'pymc3', 'matplotlib', 'seaborn'],
python_requires='>=3.5',
tests_require=['pytest'],
ext_modules=[ext_cpwt, ext_flex],
packages=['plateflex'],
package_data={
'plateflex': [
'examples/data.zip',
'examples/Notebooks/*.ipynb']
}
)