Skip non-package version files in wheels#1374
Closed
Sean-Kenneth-Doherty wants to merge 3 commits into
Closed
Conversation
This comment was marked as low quality.
This comment was marked as low quality.
This comment was marked as low quality.
This comment was marked as low quality.
Contributor
|
closing as agentic abuse - the bot ignored prior discussion and prior work the user was baned from pytest-dev for running unattended agents |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1364
build_pyshould still write package-local generated version files intobuild_lib, because those files are importable package artifacts. But paths like a top-levelVERSIONfile are source-tree artifacts; writing them intobuild_libmanufactures an installed wheel file that was not installed before.This keeps source-tree generation unchanged, including
SETUPTOOLS_SCM_WRITE_TO_SOURCE=1, but skips build outputs whose transformed path is outside discovered packages or declaredpy_modules.I also included the minimal docs-environment fix needed for this PR to pass Read the Docs: the current mkdocstrings/pymdownx/Pygments stack crashes unless highlight titles are normalized, and the docs group now includes Ruff for signature formatting.
Tests:
uv run --package setuptools-scm pytest setuptools-scm/testing_scm/test_integration.py::test_top_level_version_file_not_written_to_wheel setuptools-scm/testing_scm/test_integration.py::test_version_file_written_to_build_directory setuptools-scm/testing_scm/test_integration.py::test_version_file_src_layout_path_transformation -qTMPDIR=$PWD/.tmp PIP_CACHE_DIR=$PWD/.tmp/pip-cache uv run --package setuptools-scm pytest setuptools-scm/testing_scm/test_integration.py -qUV_PROJECT_ENVIRONMENT=$PWD/.tmp/rtd-venv uvx uv==0.11.14 sync --frozen --group docs && UV_PROJECT_ENVIRONMENT=$PWD/.tmp/rtd-venv uvx uv==0.11.14 run --no-sync --group docs python -m mkdocs build --clean --site-dir .tmp/rtd-site --config-file mkdocs.ymluv run --package setuptools-scm ruff check setuptools-scm/src/setuptools_scm/_integration/build_py.py setuptools-scm/testing_scm/test_integration.py --config setuptools-scm/pyproject.tomluv run --package setuptools-scm ruff format --check setuptools-scm/src/setuptools_scm/_integration/build_py.py setuptools-scm/testing_scm/test_integration.py --config setuptools-scm/pyproject.tomlgit diff --checkPrepared with local Codex assistance and reviewed/validated before submission.