Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
Determined that the order of parameters in the Appendix A example code
was wrong, and fixed it. This matters because `pyproject_hooks` passes
them positionally, despite that both default to `None` and it's not at
all obvious what order they "should" be in.

I commented on python/peps#2536, and cited
pypa/packaging.python.org#1111, to draw
attention to the issue in the PEP. The corresponding documentation
issue, pypa/packaging.python.org#955, still
appears not to be resolved.
  • Loading branch information
zahlman committed Jul 26, 2024
1 parent 67df4bb commit 1e0454c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bbbb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ def build_sdist(sdist_directory, config_settings):


def build_wheel(
wheel_directory, metadata_directory=None, config_settings=None
# This is the order specified in PEP 517, subsection "Mandatory hooks".
# The example build backend in Appendix A reverses the order of
# `config_settings` and `metadata_directory`. However, this does not
# actually work with standard tooling, because `pyproject_hooks` passes
# these arguments positionally and in this specific order.
wheel_directory, config_settings=None, metadata_directory=None
):
wheel_name = f"{NAME}-{VERSION}-{PYTHON_TAG}-{ABI_TAG}-{PLATFORM_TAG}.whl"
wheel_path = Path(wheel_directory) / wheel_name
Expand Down

0 comments on commit 1e0454c

Please sign in to comment.