forked from LANL-Seismoacoustics/particleman
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
61 lines (49 loc) · 1.67 KB
/
setup.py
File metadata and controls
61 lines (49 loc) · 1.67 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Particle Man: particle motion analysis of seismic surface waves
"""
import os
import sys
from numpy.distutils.system_info import get_info, system_info
try:
import setuptools
except ImportError:
pass
# This needs to be below the setuptools import
from distutils.core import setup, Extension
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
readme = f.read()
try:
import pypandoc
readme = pypandoc.convert(readme, 'md', 'rst')
except ImportError:
pass
# Find the fftw3 headers
info = system_info()
incdirs = info.get_include_dirs()
libdirs = info.get_lib_dirs()
fftw = get_info('fftw3') or get_info('fftw')
if not fftw:
print("We require either fftw3 or fftw to be present in order to build")
sys.exit(1)
#define_macros = fftw['define_macros'],
ext_modules = [Extension('particleman.libst',
include_dirs=incdirs + fftw['include_dirs'],
libraries=fftw['libraries'],
library_dirs=fftw['library_dirs'],
sources=['particleman/src/st.c'])]
setup(name='particleman',
version='0.3.0',
description='Particle motion analysis for seismic surface waves',
long_description=readme,
url='http://github.com/lanl-seismoacoustics/particleman',
author='Jonathan MacCarthy',
author_email='jkmacc@lanl.gov',
install_requires=['numpy'],
packages=['particleman'],
py_modules=['particleman.core', 'particleman.plotting', 'particleman.st',
'particleman.filter'],
ext_modules=ext_modules,
)