Skip to content

refactor: pass version to more hooks#945

Merged
mergify[bot] merged 1 commit intopython-wheel-build:mainfrom
tiran:pass-version
Mar 6, 2026
Merged

refactor: pass version to more hooks#945
mergify[bot] merged 1 commit intopython-wheel-build:mainfrom
tiran:pass-version

Conversation

@tiran
Copy link
Collaborator

@tiran tiran commented Mar 3, 2026

Pass the resolved version to more methods and hooks. This gives packagesettings.get_extra_environ access to version information in most cases.

dependencies.get_build_*_dependencies hooks now have access to version in most cases. Nightly builds from VCS don't have the version. Nightly builds have to prepare an environment, then request package metadata to get the version from metadata.

The improvement will enable us to add the version as a template variable, so env in package settings can use something like ${__version__} in the future.

See: #946

@tiran tiran requested a review from a team as a code owner March 3, 2026 07:54
@mergify mergify bot added the ci label Mar 3, 2026
@LalatenduMohanty
Copy link
Member

@tiran Are you planning a follow PR for #946 or you want someone else to work on it.

@LalatenduMohanty
Copy link
Member

@Mergifyio rebase

@mergify
Copy link
Contributor

mergify bot commented Mar 6, 2026

rebase

❌ Unable to rebase: Mergify can't impersonate LalatenduMohanty

Details

User LalatenduMohanty used as bot_account is unknown. Please make sure {login} exists and has logged into the Mergify dashboard.

@tiran
Copy link
Collaborator Author

tiran commented Mar 6, 2026

@Mergifyio rebase

Pass the resolved version to more methods and hooks. This gives
`packagesettings.get_extra_environ` access to version information in
most cases.

`dependencies.get_build_*_dependencies` hooks now have access to version
in most cases. Nightly builds from VCS don't have the version. Nightly
builds have to prepare an environment, then request package metadata to
get the version from metadata.

The improvement will enable us to add the version as a template
variable, so `env` in package settings can use something like
`${__version__}` in the future.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
@mergify
Copy link
Contributor

mergify bot commented Mar 6, 2026

rebase

✅ Branch has been successfully rebased

@tiran
Copy link
Collaborator Author

tiran commented Mar 6, 2026

@tiran Are you planning a follow PR for #946 or you want someone else to work on it.

I'm preparing the repo so somebody else can implement that feature.

@mergify mergify bot merged commit 4667c98 into python-wheel-build:main Mar 6, 2026
47 checks passed
@tiran tiran deleted the pass-version branch March 6, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants