Skip to content

refactor: pass version to more hooks#945

Open
tiran wants to merge 1 commit intopython-wheel-build:mainfrom
tiran:pass-version
Open

refactor: pass version to more hooks#945
tiran wants to merge 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

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>
@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
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.

1 participant