diff --git a/custom_mc/setup.py b/custom_mc/setup.py index a49f6d1..0addc00 100644 --- a/custom_mc/setup.py +++ b/custom_mc/setup.py @@ -1,13 +1,17 @@ # python setup.py build_ext --inplace -from setuptools import setup +from setuptools import setup, Extension from Cython.Build import cythonize import numpy as np -import os - -includes_numpy = '-I ' + np.get_include() + ' ' -os.environ['CFLAGS'] = includes_numpy + (os.environ['CFLAGS'] if 'CFLAGS' in os.environ else '') setup( name="My MC", - ext_modules=cythonize("_marching_cubes_lewiner_cy.pyx", include_path=[np.get_include()], language="c++"), + ext_modules=cythonize( + Extension( + "_marching_cubes_lewiner_cy", + sources=["_marching_cubes_lewiner_cy.pyx"], + include_dirs=[np.get_include()], + language="c++" + ) + ), + install_requires=["numpy"] )