Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build-system]
requires = ['setuptools', 'wheel', 'numpy', 'cffi', 'cython']
25 changes: 21 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sys
import os
import shutil
import subprocess

from distutils.core import setup, Extension
from Cython.Distutils import build_ext
Expand All @@ -23,17 +24,33 @@

extra_link_args=[
"-L./lib/c",
"-L"+os.environ['FFTW']+"/lib",
]

fftw_path = os.getenv("FFTW", None)
if fftw_path:
extra_link_args.append("-L{}/lib".format(fftw_path))

if not os.path.exists("./lib/c/libssht.a"):
print("Making...")
subprocess.run(["make"])
print(os.listdir("./lib/c/"))


if not os.path.exists("./lib/c/libssht.a"):
sys.exit()


setup(
classifiers=['Programming Language :: Python :: 2.7'],
classifiers=[
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
name = "pyssht",
version = "2.0",
prefix='.',
cmdclass={'build_ext': build_ext},
ext_modules=cythonize([Extension(
"src/python/pyssht",
"pyssht",
package_dir=['src'],
sources=["src/python/pyssht.pyx"],
include_dirs=include_dirs,
Expand Down
3 changes: 3 additions & 0 deletions src/python/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__version__ = '2.0.0'
__all__ = ['pyssht']
from .pyssht import *