Skip to content

Commit

Permalink
Try to fix cython hell
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyu committed Aug 23, 2022
1 parent fe3c004 commit 6b09223
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ include nerfvis/scene.py
include nerfvis/utils/sh.py
include nerfvis/utils/__init__.py
include nerfvis/utils/_rotation.pyx
include nerfvis/utils/_rotation.c
include nerfvis/__init__.py
include nerfvis/volrend.zip
include nerfvis/version.py
2 changes: 1 addition & 1 deletion nerfvis/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.14'
__version__ = '0.0.15'
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[build-system]
requires = ["setuptools", "wheel", "Cython"]
requires = ["setuptools", "wheel", "numpy"]
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import logging
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
from Cython.Build import cythonize
from distutils.errors import CCompilerError, DistutilsExecError, DistutilsPlatformError
import numpy
ext_errors = (CCompilerError, DistutilsExecError, DistutilsPlatformError, IOError, SystemExit)

__version__ = None
Expand All @@ -12,8 +12,11 @@
log = logging.getLogger(__file__)

cython_args = {}
cython_args["ext_modules"] = cythonize(Extension("nerfvis.utils._rotation",
["nerfvis/utils/_rotation.pyx"]))
cython_args["ext_modules"] = [Extension(
"nerfvis.utils._rotation",
["nerfvis/utils/_rotation.c"],
include_dirs=[numpy.get_include()],
)]
cython_args["cmdclass"] = {'build_ext': build_ext}

try:
Expand Down

0 comments on commit 6b09223

Please sign in to comment.