Skip to content

Conversation

@patchback
Copy link

@patchback patchback bot commented Nov 11, 2025

This is a backport of PR #13933 as merged into main (ce8b8a7).

This patch fixes passing the release version string from the release automation script to the tox's PEP 517 frontend, so that the backend machinery bits (namely, setuptools-scm) could access the environment variable; as indentified in the attempt to release pytest v9.0.1 [1].

The solution uses the [pkgenv] section of tox.ini that corresponds to the PEP 517 build env tox manages internally.

…tuptools-scm-pretend-env-var

📦 Pass desired release to PEP 517 tox env

(cherry picked from commit ce8b8a7)
Copilot finished reviewing on behalf of webknjaz November 11, 2025 19:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR is a backport of #13933 that fixes the release automation process by ensuring the SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST environment variable is passed to the PEP 517 build environment (managed by tox) rather than just to test environments. This allows setuptools-scm to access the desired version during wheel assembly.

Key Changes:

  • Moved SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST from test environments to the [pkgenv] section for PEP 517 build environment
  • Added comprehensive documentation explaining the configuration and workarounds for tox v4.14.1 regression
  • Removed redundant passenv configurations from [testenv] and [testenv:regen] sections

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tox.ini Added [pkgenv] section to pass version environment variable to PEP 517 build environment; removed the variable from test environment configurations where it's no longer needed
changelog/13933.packaging.rst Contains incorrect content - references another changelog file instead of actual content
changelog/13933.contrib.rst Documents the tox configuration change for contributors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@webknjaz webknjaz merged commit 4bd63a0 into 9.0.x Nov 11, 2025
39 checks passed
@webknjaz webknjaz deleted the patchback/backports/9.0.x/ce8b8a7b4b360ac5f3953b8c3b8b59e6bb420f37/pr-13933 branch November 11, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants