e97e82f831
Packages that consume pdm-backend often use it, quite similary to setuptools-scm-version, for dynamic versioning. That works fine when pulling releases from PyPi, but needs special handling, when releases are pulled from Git. The pdm-backend package will now always export `PDM_BUILD_SCM_VERSION=` to propagate the derivation version to pdm-backend. This behaviour can be disabled by setting ``` dontSetPdmBackendVersion = true; ```
9 lines
209 B
Bash
9 lines
209 B
Bash
version-pretend-hook() {
|
|
echo "Setting PDM_BUILD_SCM_VERSION to $version"
|
|
export PDM_BUILD_SCM_VERSION=$version
|
|
}
|
|
|
|
if [ -z "${dontSetPdmBackendVersion-}" ]; then
|
|
preBuildHooks+=(version-pretend-hook)
|
|
fi
|