From 2f471e7c4aeb9cce65618c7df5ac91737cb2bdb0 Mon Sep 17 00:00:00 2001 From: Jeremy Hansen Date: Wed, 3 Apr 2024 15:51:44 -0700 Subject: python/python3-platformdirs: Fix building on -current Signed-off-by: Willy Sudiarto Raharjo --- .../python3-platformdirs.SlackBuild | 29 ++++++++++------------ 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'python/python3-platformdirs/python3-platformdirs.SlackBuild') diff --git a/python/python3-platformdirs/python3-platformdirs.SlackBuild b/python/python3-platformdirs/python3-platformdirs.SlackBuild index e27c7607c9..dac8d988e2 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 -- cgit v1.2.3