Open Xiretza opened 2 years ago
Hi @Xiretza, thanks for raising this point. I'm not really sure to be honest, I'm not expert in setuptools hooks and I naively assumed that each build extension should process only its own stuff. I imagine that also other build extensions implement their own BuildExtension.run
method, and I assume that they also filter their instance but I might be wrong.
What's the behavior you're experiencing? Are you sure that the line you linked prevents the execution of other build extensions? Can you check on your example by adding some print statements in all run
methods of the extensions you're using?
This project overrides the global build_ext
:
As far as I can tell there can only be one build_ext
, and if it filters out all modules it isn't specifically designed for, that's just not gonna work.
Ok now I see what you mean, do you have any suggestion on how to work around this limitation?
Not really. BuildExtension.run()
should probably call super().run()
at some point, but that will of course try to build and install the CMakeExtension
s as well.
@diegoferigo you could in theory skip most of the preprocessing that is currently being done in the run
function and check instance types inside build_extension
and forwarding to the correct build_ext
object.
Unless I'm misinterpreting something, using
BuildExtension
ascmdclass['build_ext']
insetup.py
makes any non-cmake extension modules completely ineffective, becauseBuildExtension.run()
simply ignores them: https://github.com/diegoferigo/cmake-build-extension/blob/2c3d822e40fe3fd2d769ad09dba367e6617dcc82/src/cmake_build_extension/build_extension.py#L82Is my understanding correct? How would I use this project if I also have e.g.
cython
extension modules?