summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author fourtysixandtwo2024-03-30 13:16:29 +0100
committer Willy Sudiarto Raharjo2024-04-05 10:18:07 +0200
commit2bd2be996091ce3288b7531d3ec3b349a45bb30f (patch)
treeab84cfde4b2f876822d3c7cbca941826a86e4037
parent88b6637ca49d5f89cd427f7aeaf52bc843fb161a (diff)
downloadslackbuilds-2bd2be996091ce3288b7531d3ec3b349a45bb30f.tar.gz
python/python3-setuptools-rust-opt: Fix build on current.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--python/python3-setuptools-rust-opt/README7
-rw-r--r--python/python3-setuptools-rust-opt/python3-setuptools-rust-opt.SlackBuild8
2 files changed, 9 insertions, 6 deletions
diff --git a/python/python3-setuptools-rust-opt/README b/python/python3-setuptools-rust-opt/README
index 168558a39c..bf86a777ba 100644
--- a/python/python3-setuptools-rust-opt/README
+++ b/python/python3-setuptools-rust-opt/README
@@ -3,9 +3,10 @@ python3-setuptools-rust-opt (setuptools-rust installed to /opt)
setuptools-rust is a plugin for setuptools to build Rust Python
extensions implemented with PyO3 or rust-cpython.
-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:
+Slackbuild to use this version.:
-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-rust-opt/python3-setuptools-rust-opt.SlackBuild b/python/python3-setuptools-rust-opt/python3-setuptools-rust-opt.SlackBuild
index 7df4c4a204..500539769b 100644
--- a/python/python3-setuptools-rust-opt/python3-setuptools-rust-opt.SlackBuild
+++ b/python/python3-setuptools-rust-opt/python3-setuptools-rust-opt.SlackBuild
@@ -66,16 +66,18 @@ 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 {} \+
-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/
+
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$PYVE$PYVERR"
exit 1
fi