Skip to content

Commit

Permalink
Rebuild .c ext
Browse files Browse the repository at this point in the history
  • Loading branch information
wpreimes committed Jun 14, 2024
1 parent 713996d commit 6852542
Show file tree
Hide file tree
Showing 4 changed files with 90,661 additions and 65,979 deletions.
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_ext_modules(ext):
def cythonize_extensions():
from Cython.Build import cythonize

cythonize(
cythonized_modules = cythonize(
get_ext_modules(".pyx"),
compiler_directives={
"embedsignature": True,
Expand All @@ -55,6 +55,7 @@ def cythonize_extensions():
},
# include_path=[numpy.get_include()],
)
return cythonized_modules


class CythonizeMixin(object):
Expand All @@ -69,7 +70,7 @@ def initialize_options(self):

def run(self):
if self.cythonize:
cythonize_extensions()
self.distribution.ext_modules = cythonize_extensions()
super().run()


Expand All @@ -84,6 +85,7 @@ class build_ext(CythonizeMixin, _build_ext):


if __name__ == "__main__":
# to create .c files run `python setup.py build_ext --cythonize`
try:
cmdclass = {}
cmdclass["sdist"] = sdist
Expand Down
Loading

0 comments on commit 6852542

Please sign in to comment.