From 79a994f8cd4f293881b8168b3b782e02f48d7cf1 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 14 May 2026 19:16:54 +0200 Subject: Fix: python3-platformdirs --- python3-platformdirs/python3-platformdirs.SlackBuild | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python3-platformdirs/python3-platformdirs.SlackBuild b/python3-platformdirs/python3-platformdirs.SlackBuild index cde266c..e165c91 100644 --- a/python3-platformdirs/python3-platformdirs.SlackBuild +++ b/python3-platformdirs/python3-platformdirs.SlackBuild @@ -85,10 +85,11 @@ find -L . \ SETUPTOOLS_SCM_PRETEND_VERSION=$VERSION python3 -m build --wheel --no-isolation python3 -m installer --destdir "$PKG" dist/*.whl -# Fix version.py: setuptools-scm leaves it empty without git; prepend the version vars +# Fix version.py: setuptools-scm leaves vars unset without git tags; insert after from __future__ VERFILE=$(find "$PKG" -name "version.py" -path "*/platformdirs/*") if [ -n "$VERFILE" ]; then - sed -i "1i __version__ = \"$VERSION\"\n__version_tuple__ = ($(echo $VERSION | tr '.' ','))" "$VERFILE" + VERTUPLE="($(echo $VERSION | tr '.' ','))" + sed -i "/^from __future__/a __version__ = \"$VERSION\"\n__version_tuple__ = $VERTUPLE" "$VERFILE" fi find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ -- cgit v1.2.3