aboutsummaryrefslogtreecommitdiff
path: root/python/python3-virtualenv/python3-virtualenv.SlackBuild
diff options
context:
space:
mode:
authorJeremy Hansen <jebrhansen+github@gmail.com>2023-10-03 00:55:20 -0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-10-07 00:59:33 +0700
commitf95997351d99e574489992446985e5bdd2c71e6d (patch)
tree9001a05bf29e033f6c0bd434d579a89ebb426435 /python/python3-virtualenv/python3-virtualenv.SlackBuild
parent0efe933e68a129bbe2f266c4bf13e64ddea2d861 (diff)
python/python3-virtualenv: Version bump to 20.24.5
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/python3-virtualenv/python3-virtualenv.SlackBuild')
-rw-r--r--python/python3-virtualenv/python3-virtualenv.SlackBuild29
1 files changed, 24 insertions, 5 deletions
diff --git a/python/python3-virtualenv/python3-virtualenv.SlackBuild b/python/python3-virtualenv/python3-virtualenv.SlackBuild
index 6e62aac77b..6a85b85dc1 100644
--- a/python/python3-virtualenv/python3-virtualenv.SlackBuild
+++ b/python/python3-virtualenv/python3-virtualenv.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for python3-virtualenv
# Copyright 2023 Isaac Yu <isaacyu1@isaacyu1.com>
+# Copyright 2023 Jeremy Hansen <jebrhansen+SBo@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,13 +26,12 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python3-virtualenv
-VERSION=${VERSION:-20.17.1}
-BUILD=${BUILD:-2}
+SRCNAM=virtualenv
+VERSION=${VERSION:-20.24.5}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-SRCNAM=virtualenv
-
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -49,6 +49,18 @@ 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"
+elif [ "$ARCH" = "aarch64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
set -eu
rm -rf $PKG
@@ -66,7 +78,14 @@ find -L . \
export SETUPTOOLS_SCM_PRETEND_VERSION=$VERSION
-python3 setup.py install --root=$PKG
+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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION