summaryrefslogtreecommitdiffstats
path: root/python/python3-setuptools-opt
diff options
context:
space:
mode:
author fourtysixandtwo <fourtysixandtwo@sliderr.net>2024-03-31 07:35:21 -0600
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2024-04-05 15:18:08 +0700
commit100b61bcc58b7cb2c62c28a0fcfe82a87458e87c (patch)
treefdfba54aa6a91af4e414a58d7df8b15f1629ba0d /python/python3-setuptools-opt
parent8445ac25521a63752f7d902ed865bc875608a87f (diff)
downloadslackbuilds-100b61bcc58b7cb2c62c28a0fcfe82a87458e87c.tar.gz
slackbuilds-100b61bcc58b7cb2c62c28a0fcfe82a87458e87c.tar.xz
python/python3-setuptools-opt: README fixes.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/python3-setuptools-opt')
-rw-r--r--python/python3-setuptools-opt/README5
-rw-r--r--python/python3-setuptools-opt/python3-setuptools-opt.SlackBuild6
2 files changed, 7 insertions, 4 deletions
diff --git a/python/python3-setuptools-opt/README b/python/python3-setuptools-opt/README
index 7d957ab7fc..5b65d6ba0b 100644
--- a/python/python3-setuptools-opt/README
+++ b/python/python3-setuptools-opt/README
@@ -3,9 +3,10 @@ python3-setuptools-opt (Install newer setuptools in /opt)
Setuptools is a fully-featured, actively-maintained, and stable
library designed to facilitate packaging Python projects.
-Installs to /opt/python3.9/site-packages.
+Installs to /opt/python$PYVER/site-packages.
Add the following before the python3 build commands in your
Slackbuild to use this version over the stock one in 15.0:
-export PYTHONPATH=/opt/python3.9/site-packages/
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages
diff --git a/python/python3-setuptools-opt/python3-setuptools-opt.SlackBuild b/python/python3-setuptools-opt/python3-setuptools-opt.SlackBuild
index ab5aeafb2c..aaec7e3d77 100644
--- a/python/python3-setuptools-opt/python3-setuptools-opt.SlackBuild
+++ b/python/python3-setuptools-opt/python3-setuptools-opt.SlackBuild
@@ -95,15 +95,17 @@ if [ "$LIBDIRSUFFIX" = "64" ]; then
zcat $CWD/setuptools.x86_64.diff.gz | patch -p1 --verbose || exit 1
fi
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+
python3 -m build --no-isolation
python3 -m installer -d "$PKG" dist/*.whl
if [ "$PKG/usr/" != "/usr/" ]; then
mkdir -p $PKG/opt
- mv $PKG/usr/lib*/python3.9 $PKG/opt/
+ mv $PKG/usr/lib*/python$PYVER $PKG/opt/
rmdir $PKG/usr/lib*
else
- echo "ERROR: \$PKG is not set! We don't want to move the real /usr/lib*/python3.9"
+ echo "ERROR: \$PKG is not set! We don't want to move the real /usr/lib*/python$PYVER"
exit 1
fi