diff options
author | fourtysixandtwo <fourtysixandtwo@sliderr.net> | 2024-03-30 06:16:29 -0600 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-04-05 15:18:07 +0700 |
commit | 2bd2be996091ce3288b7531d3ec3b349a45bb30f (patch) | |
tree | ab84cfde4b2f876822d3c7cbca941826a86e4037 /python/python3-setuptools-rust-opt | |
parent | 88b6637ca49d5f89cd427f7aeaf52bc843fb161a (diff) |
python/python3-setuptools-rust-opt: Fix build on current.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/python3-setuptools-rust-opt')
-rw-r--r-- | python/python3-setuptools-rust-opt/README | 7 | ||||
-rw-r--r-- | python/python3-setuptools-rust-opt/python3-setuptools-rust-opt.SlackBuild | 8 |
2 files changed, 9 insertions, 6 deletions
diff --git a/python/python3-setuptools-rust-opt/README b/python/python3-setuptools-rust-opt/README index 168558a39ccf8..bf86a777ba734 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 7df4c4a2046cf..500539769b772 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 |