From 41668b72c3ce7cc259e6b5121c1468c99552912b Mon Sep 17 00:00:00 2001 From: Andrea Zonca Date: Tue, 16 Jan 2018 07:36:40 -0800 Subject: [PATCH] use cythonize instead of build_ext --- python/setup.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/python/setup.py b/python/setup.py index 52407ee..788d7a6 100644 --- a/python/setup.py +++ b/python/setup.py @@ -27,7 +27,7 @@ project_path = os.path.split(__file__)[0] sys.path.append(os.path.join(project_path, 'fake_pyrex')) from setuptools import setup, find_packages, Extension -from Cython.Distutils import build_ext +from Cython.Build import cythonize import numpy as np libsharp = os.environ.get('LIBSHARP', None) @@ -64,8 +64,7 @@ if __name__ == "__main__": 'Intended Audience :: Science/Research', 'License :: OSI Approved :: GNU General Public License (GPL)', 'Topic :: Scientific/Engineering'], - cmdclass = {"build_ext": build_ext}, - ext_modules = [ + ext_modules = cythonize([ Extension("libsharp.libsharp", ["libsharp/libsharp.pyx"], libraries=["sharp", "fftpack", "c_utils"], @@ -80,5 +79,5 @@ if __name__ == "__main__": library_dirs=[libsharp_lib], extra_link_args=["-fopenmp"], ), - ], + ]), )