diff options
Diffstat (limited to 'academic/rpy2')
-rw-r--r-- | academic/rpy2/README | 4 | ||||
-rw-r--r-- | academic/rpy2/rpy2.SlackBuild | 34 | ||||
-rw-r--r-- | academic/rpy2/rpy2.info | 8 |
3 files changed, 31 insertions, 15 deletions
diff --git a/academic/rpy2/README b/academic/rpy2/README index 702373878f..3685736766 100644 --- a/academic/rpy2/README +++ b/academic/rpy2/README @@ -15,8 +15,10 @@ jupyter notebooks or ipython. NOTE: R needs to be compiled with the shared library flag, thus: build R on SBo with R_SHLIB=yes and BLAS_SHLIB=yes - (See also the notes in the rpy2.Slackbuild) +Remove installed rpy2 before building and upgrading to a new version. + + home:https://rpy2.github.io/ documentation:https://rpy2.github.io/doc/latest/html/index.html diff --git a/academic/rpy2/rpy2.SlackBuild b/academic/rpy2/rpy2.SlackBuild index 745ca9ea47..ea640b1291 100644 --- a/academic/rpy2/rpy2.SlackBuild +++ b/academic/rpy2/rpy2.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # # SlackBuild for rpy2 # -# Copyright 2020-2021 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: @@ -21,10 +21,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=rpy2 -VERSION=${VERSION:-3.4.2} +VERSION=${VERSION:-3.5.16} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -34,7 +37,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -77,20 +84,27 @@ fi ## make sure that R has been compiled with ## --enable-R-shlib ## --enable-BLAS-shlib -RHOMLIB=$(R RHOME)/lib -echo "R libs are in $RHOMLIB" +RHOMLIB=$(R RHOME) +echo Found R libs: +echo $RHOMLIB/lib/* -if ! [ "$(readelf -h $RHOMLIB/libR*.so | grep DYN)" ]; then +if ! [ "$(readelf -h $RHOMLIB/lib/libR*.so | grep DYN)" ]; then echo "Error: R is not compiled with shared libraries." >&2 exit 1 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 @@ -107,4 +121,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/academic/rpy2/rpy2.info b/academic/rpy2/rpy2.info index d570955556..2c3adced95 100644 --- a/academic/rpy2/rpy2.info +++ b/academic/rpy2/rpy2.info @@ -1,10 +1,10 @@ PRGNAM="rpy2" -VERSION="3.4.2" +VERSION="3.5.16" HOMEPAGE="https://rpy2.github.io/" -DOWNLOAD="https://pypi.python.org/packages/source/r/rpy2/rpy2-3.4.2.tar.gz" -MD5SUM="94fd0ac2a6ca69464cfc51ec0871c349" +DOWNLOAD="https://pypi.python.org/packages/source/r/rpy2/rpy2-3.5.16.tar.gz" +MD5SUM="be5385a5547673f5b1b64e245dcd7f13" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="R cffi Jinja2 python3-pytest tzlocal" +REQUIRES="R cffi python3-pytest tzlocal python3-setuptools-scm-opt" MAINTAINER="Rob van Nues" EMAIL="sborg63@disroot.org" |