aboutsummaryrefslogtreecommitdiffstats
path: root/python3-platformdirs
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-05-14 19:16:54 +0200
committerDanilo M. <danix@danix.xyz>2026-05-14 19:16:54 +0200
commit79a994f8cd4f293881b8168b3b782e02f48d7cf1 (patch)
tree5acc7016e23c348a29bdc859c1cc88c994de8b58 /python3-platformdirs
parent97775c2fbb837a563000fc826b6dd6abed192bf6 (diff)
downloadmy-slackbuilds-79a994f8cd4f293881b8168b3b782e02f48d7cf1.tar.gz
my-slackbuilds-79a994f8cd4f293881b8168b3b782e02f48d7cf1.zip
Fix: python3-platformdirsmain
Diffstat (limited to 'python3-platformdirs')
-rw-r--r--python3-platformdirs/python3-platformdirs.SlackBuild5
1 files 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 \