-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "follow ChatGPT's suggestion"
This reverts commit 8f62941.
- Loading branch information
Showing
2 changed files
with
9 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,11 @@ | ||
from setuptools.command.build_ext import build_ext | ||
from setuptools import setup, Extension | ||
import numpy | ||
|
||
# Check if Cython is available | ||
try: | ||
from Cython.Build import cythonize | ||
except ImportError: | ||
def cythonize(module_list): | ||
return module_list | ||
|
||
# Define the extension module | ||
ext = Extension( | ||
'mamonca', | ||
sources=["mamonca/mc.pyx"], | ||
language="c++", | ||
include_dirs=[numpy.get_include()], | ||
extra_compile_args=['-std=c++11'], | ||
) | ||
|
||
|
@@ -32,12 +23,12 @@ def cythonize(module_list): | |
author_email='[email protected]', | ||
license='BSD', | ||
cmdclass={"build_ext": build_ext}, | ||
ext_modules=cythonize([ext]), | ||
ext_modules=[ext], | ||
options={'build': {'build_lib': 'mamonca'}}, | ||
setup_requires=[ | ||
# Setuptools 18.0 properly handles Cython extensions. | ||
'setuptools>=18.0', | ||
'cython', | ||
'numpy', | ||
], | ||
) | ||
|