diff options
author | Jeremy Hansen <jebrhansen+github@gmail.com> | 2024-04-03 15:51:44 -0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-04-04 11:49:46 +0700 |
commit | 2f471e7c4aeb9cce65618c7df5ac91737cb2bdb0 (patch) | |
tree | 95f6e275f532d7d5e37a984f77885ab961d364f0 /python/python3-platformdirs | |
parent | 92a157aa25f9fcdc38b14e0b7f5ef5cc40c29936 (diff) |
python/python3-platformdirs: Fix building on -current
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/python3-platformdirs')
-rw-r--r-- | python/python3-platformdirs/python3-platformdirs.SlackBuild | 29 | ||||
-rw-r--r-- | python/python3-platformdirs/python3-platformdirs.info | 2 |
2 files changed, 14 insertions, 17 deletions
diff --git a/python/python3-platformdirs/python3-platformdirs.SlackBuild b/python/python3-platformdirs/python3-platformdirs.SlackBuild index e27c7607c96aa..dac8d988e278b 100644 --- a/python/python3-platformdirs/python3-platformdirs.SlackBuild +++ b/python/python3-platformdirs/python3-platformdirs.SlackBuild @@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=python3-platformdirs VERSION=${VERSION:-4.2.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -50,15 +50,15 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ]; then - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - LIBDIRSUFFIX="64" -else - LIBDIRSUFFIX="" -fi +#if [ "$ARCH" = "i586" ]; then +# LIBDIRSUFFIX="" +#elif [ "$ARCH" = "i686" ]; then +# LIBDIRSUFFIX="" +#elif [ "$ARCH" = "x86_64" ]; then +# LIBDIRSUFFIX="64" +#else +# LIBDIRSUFFIX="" +#fi set -e @@ -75,15 +75,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 {} \; +PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])') +export PYTHONPATH=/opt/python$PYVER/site-packages + python3 -m build --wheel --no-isolation python3 -m installer --destdir "$PKG" dist/*.whl -# Fix version importing when using setuptools_scm<7 -# Thanks to dofuuz -# https://github.com/dofuuz/python-soxr/issues/21 -sed -i 's/version =/__version__ = &/' $PKG/usr/lib$LIBDIRSUFFIX/python3.9/site-packages/$SRCNAM/version.py -sed -i 's/version_tuple/__&__ = &/' $PKG/usr/lib$LIBDIRSUFFIX/python3.9/site-packages/$SRCNAM/version.py - 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/python/python3-platformdirs/python3-platformdirs.info b/python/python3-platformdirs/python3-platformdirs.info index d6917b708f1cd..7357ff024cb51 100644 --- a/python/python3-platformdirs/python3-platformdirs.info +++ b/python/python3-platformdirs/python3-platformdirs.info @@ -5,6 +5,6 @@ DOWNLOAD="https://files.pythonhosted.org/packages/source/p/platformdirs/platform MD5SUM="658f1b6259e29c472ea67bc60f3e35f1" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="python3-hatch_vcs" +REQUIRES="python3-hatch_vcs python3-setuptools-scm-opt" MAINTAINER="Jeremy Hansen" EMAIL="jebrhansen+SBo@gmail.com" |