Skip to content

Commit

Permalink
python310Packages.poetry-dynamic-versioning: Add setup-hook
Browse files Browse the repository at this point in the history
to not so dynamically set the package version.
  • Loading branch information
mweinelt committed Jun 15, 2023
1 parent 35e5b06 commit f71d491
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ buildPythonPackage rec {
"poetry_dynamic_versioning"
];

setupHook = ./setup-hook.sh;

meta = with lib; {
description = "Plugin for Poetry to enable dynamic versioning based on VCS tags";
homepage = "https://github.com/mtkennerly/poetry-dynamic-versioning";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version-pretend-hook() {
echo "Setting POETRY_DYNAMIC_VERSIONING_BYPASS to $version"
export POETRY_DYNAMIC_VERSIONING_BYPASS=$version
}

if [ -z "${dontBypassPoetryDynamicVersioning-}" ]; then
preBuildHooks+=(version-pretend-hook)
fi

0 comments on commit f71d491

Please sign in to comment.