[BUG] build_meta: prepare_metadata_for_build_wheel
hook does not honor --build-option
#4293
Labels
prepare_metadata_for_build_wheel
hook does not honor --build-option
#4293
setuptools version
setuptools==69.2.0 and wheel==0.43.0
Python version
Python 3.12
OS
Fedora Linux
Additional environment information
No response
Description
I am trying to run the
prepare_metadata_for_build_wheel
hook for the https://github.com/Rogdham/pyzstd project as part of the Fedora Linux build process. The project requires passing--dynamic-link-zstd
when building without the in-treezstd
copy or else it fails withFileNotFoundError: [Errno 2] No such file or directory: 'zstd/lib/common/'
.I ran
python -c 'from setuptools.build_meta import *; prepare_metadata_for_build_wheel("dist", {"--build-option": "--dynamic-link-zstd"})'
and expected the build backend to pass
--dynamic-link-zstd
through to the internalsetup.py dist_info
subcommand that it calls to generate the metadata. Instead, it only passes['dist_info', '--output-dir', 'dist', '--keep-egg-info']
.Should pyzstd be changed to allow setting this option through a different mechanism (e.g., an environment variable) or can setuptools start honoring
--build-option
for theprepare_metadata_for_build_wheel
hook?Relates: #3896
CC: @Rogdham
Expected behavior
See above
How to Reproduce
Checkout https://github.com/Rogdham/pyzstd without the
zstd
submodule and run the command mentioned above.Output
n/a
The text was updated successfully, but these errors were encountered: