Setuptools functionality breaks when cffi_modules is used
Issue #345
resolved
We've just had to change how one of our cffi related modules builds and added cffi_modules to our setup.py. This broke our build. I think I tracked the root of the issue down to setuptools_ext.py, specifically _add_py_module importing build_py (and likely build_ext) from distutils instead of setuptools. This results in any setuptools functionality getting 'lost'. It looks like an earlier modification to _add_c_module above it already seems to have fixed this.
We'd appreciated a quick fix to this; currently we're unable to make builds unless we locally edit the module.
Proposed patch:
def _add_py_module(dist, ffi, module_name): from distutils.dir_util import mkpath - from distutils.command.build_py import build_py - from distutils.command.build_ext import build_ext + from setuptools.command.build_py import build_py + from setuptools.command.build_ext import build_ext from distutils import log from cffi import recompiler
Comments (2)
-
-
- changed status to resolved
Sorry, I somehow lost track of this issue. Applied the patch, thanks!
- Log in to comment
FYI, I have a workaround for now. I include
In cmdclass, where build_py and build_ext are the setuptools ones.