You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The well-trod path for building python extension modules is by letting
their build be driven by the setuptools machinery. I tried to drive the
build of some extensions from another build-system (e.g. cmake), and
then injected those extensions into the wheel using MANIFEST.in.
This is, however, less declarative than I'd like (with respect to the move
towards pyproject.toml etc). I was wondering what approach would make
sense here.
The well-trod path for building python extension modules is by letting
their build be driven by the setuptools machinery. I tried to drive the
build of some extensions from another build-system (e.g. cmake), and
then injected those extensions into the wheel using
MANIFEST.in
.This is inspired by
scikit-build
-s use ofpackage_data
to achieve thesame: https://github.com/scikit-build/scikit-build/blob/676e110315a971abb856edbd6df0c74293e5ba2d/skbuild/setuptools_wrap.py#L882C20-L882C20
However, I ran into an issue with the way
wheel
classifies the packageas un-pure: it does so only if it has extension modules or C libraries (
wheel/src/wheel/bdist_wheel.py
Lines 263 to 265 in 5bff47e
This gets me a wrongly-classified wheel. I looked around and there seems
to be no escape-hatch for customizing this.
scikit-build
-s workaround isto override the
distclass
: https://github.com/scikit-build/scikit-build/blob/676e110315a971abb856edbd6df0c74293e5ba2d/skbuild/setuptools_wrap.py#L770-L775This is, however, less declarative than I'd like (with respect to the move
towards pyproject.toml etc). I was wondering what approach would make
sense here.
Also, because the wheel name is computed dynamically, and is part of the
interface, I resorted to a solution derived from this: https://stackoverflow.com/questions/51939257/how-do-you-get-the-filename-of-a-python-wheel-when-running-setup-py/60773383#60773383
Which is quite unfortunate. When I express the dependencies in the build
system (input files and output files) it's very helpful to know the output
filename in advance.
Thanks for the advice!
The text was updated successfully, but these errors were encountered: