forked from astro-informatics/ssht-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
44 lines (37 loc) · 958 Bytes
/
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
import sys
import os
import shutil
from distutils.core import setup, Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize
import numpy
# clean previous build
for root, dirs, files in os.walk("./src/python/", topdown=False):
for name in dirs:
if (name == "build"):
shutil.rmtree(name)
include_dirs = [
numpy.get_include(),
"./include",
"./include/c",
]
extra_link_args=[
"-L./lib/c",
"-L"+os.environ['FFTW']+"/lib",
]
setup(
classifiers=['Programming Language :: Python :: 2.7'],
name = "pyssht",
version = "2.0",
prefix='.',
cmdclass={'build_ext': build_ext},
ext_modules=cythonize([Extension(
"src/python/pyssht",
package_dir=['src'],
sources=["src/python/pyssht.pyx"],
include_dirs=include_dirs,
libraries=["ssht", "fftw3"],
extra_link_args=extra_link_args,
extra_compile_args=[]
)])
)