summaryrefslogtreecommitdiffstats
path: root/academic/rpy2/rpy2.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/rpy2/rpy2.SlackBuild')
-rw-r--r--academic/rpy2/rpy2.SlackBuild17
1 files changed, 10 insertions, 7 deletions
diff --git a/academic/rpy2/rpy2.SlackBuild b/academic/rpy2/rpy2.SlackBuild
index f2463ceec0..23396b09d6 100644
--- a/academic/rpy2/rpy2.SlackBuild
+++ b/academic/rpy2/rpy2.SlackBuild
@@ -2,7 +2,7 @@
#
# SlackBuild for rpy2
#
-# Copyright 2020-2022 Rob van Nues (sborg63@disroot.org)
+# Copyright 2020-2024 Rob van Nues (sborg63@disroot.org)
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
@@ -24,7 +24,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=rpy2
-VERSION=${VERSION:-3.5.3}
+VERSION=${VERSION:-3.5.15}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -37,9 +37,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -98,10 +95,16 @@ fi
## this removes an error message from setup.py
## https://github.com/rpy2/rpy2/issues/675
-export LD_LIBRARY_PATH="${RHOMLIB}:${LD_LIBRARY_PATH}"
+export LD_LIBRARY_PATH="${RHOMLIB}/lib:${LD_LIBRARY_PATH}"
echo "LD_LIBRARY_PATH set to ${LD_LIBRARY_PATH}"
-python3 setup.py build install --root=$PKG
+# replace deprecated `python3 setup.py build install --root=$PKG`
+# thanks to fourtysixandtwo
+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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS gpl-2.0.txt NEWS README* $PKG/usr/doc/$PRGNAM-$VERSION