aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-07-11 11:26:55 +0200
committerDanilo M. <danix@danix.xyz>2026-07-11 11:26:55 +0200
commitf47467cb400ea18e9558c409c3602e0a18d8879e (patch)
treeee079be144c6c0a45cd5550aa67d2dbad19dbdd9
parentf0d66a9c421a4911cf182aea43a107fcb146ebfe (diff)
downloadmy-slackbuilds-f47467cb400ea18e9558c409c3602e0a18d8879e.tar.gz
my-slackbuilds-f47467cb400ea18e9558c409c3602e0a18d8879e.zip
python3-platformdirs: fix REQUIRES for hatchling build backend
The 4.10.0 build failed on 15.0 stable with BackendUnavailable: Cannot import 'hatchling.build'. The --no-isolation build needs the backend importable, but REQUIRES did not list it. Add python3-hatchling and python3-hatch-vcs. Drop the manual version.py sed fixup: hatch-vcs writes src/platformdirs/version.py during the build via SETUPTOOLS_SCM_PRETEND_VERSION, so it is redundant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
-rw-r--r--python3-platformdirs/python3-platformdirs.SlackBuild11
-rw-r--r--python3-platformdirs/python3-platformdirs.info2
2 files changed, 4 insertions, 9 deletions
diff --git a/python3-platformdirs/python3-platformdirs.SlackBuild b/python3-platformdirs/python3-platformdirs.SlackBuild
index bd61a97..54e8406 100644
--- a/python3-platformdirs/python3-platformdirs.SlackBuild
+++ b/python3-platformdirs/python3-platformdirs.SlackBuild
@@ -64,17 +64,12 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# platformdirs uses setuptools-scm; provide version so it doesn't require git tags
+# platformdirs uses hatch-vcs (setuptools-scm under the hood); provide the
+# version so it doesn't need git tags. hatch-vcs writes src/platformdirs/version.py
+# during the build, so no manual fixup is needed.
SETUPTOOLS_SCM_PRETEND_VERSION=$VERSION python3 -m build --wheel --no-isolation
python3 -m installer --destdir "$PKG" dist/*.whl
-# 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
- 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 \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
diff --git a/python3-platformdirs/python3-platformdirs.info b/python3-platformdirs/python3-platformdirs.info
index 472ee08..45bb1fb 100644
--- a/python3-platformdirs/python3-platformdirs.info
+++ b/python3-platformdirs/python3-platformdirs.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://files.pythonhosted.org/packages/d7/47/e4501f49c178ae1d9f4a7507
MD5SUM="ee2194f2e71385c5dc6b647858dc1da4"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="python3-build python3-installer"
+REQUIRES="python3-hatchling python3-hatch-vcs python3-build python3-installer"
MAINTAINER="Jeremy Hansen"
EMAIL="jebrhansen+SBo@gmail.com"