Skip to content

Commit 41668b7

Browse files
committed
use cythonize instead of build_ext
1 parent 6a13a9b commit 41668b7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

python/setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
sys.path.append(os.path.join(project_path, 'fake_pyrex'))
2828

2929
from setuptools import setup, find_packages, Extension
30-
from Cython.Distutils import build_ext
30+
from Cython.Build import cythonize
3131
import numpy as np
3232

3333
libsharp = os.environ.get('LIBSHARP', None)
@@ -64,8 +64,7 @@
6464
'Intended Audience :: Science/Research',
6565
'License :: OSI Approved :: GNU General Public License (GPL)',
6666
'Topic :: Scientific/Engineering'],
67-
cmdclass = {"build_ext": build_ext},
68-
ext_modules = [
67+
ext_modules = cythonize([
6968
Extension("libsharp.libsharp",
7069
["libsharp/libsharp.pyx"],
7170
libraries=["sharp", "fftpack", "c_utils"],
@@ -80,5 +79,5 @@
8079
library_dirs=[libsharp_lib],
8180
extra_link_args=["-fopenmp"],
8281
),
83-
],
82+
]),
8483
)

0 commit comments

Comments
 (0)