aboutsummaryrefslogtreecommitdiff
path: root/academic/rpy2
diff options
context:
space:
mode:
authorRob van Nues <sborg63@disroot.org>2020-04-24 08:04:37 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-04-24 08:04:52 +0700
commit1cae1105203f37cf75d8e23bc0e3f47e1e565376 (patch)
tree56f9c4a53d53c2ee8872c3f82f45688684a07e5b /academic/rpy2
parentf30839492c4cb2e51295963e1733761483843084 (diff)
academic/rpy2: Updated for version 3.3.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic/rpy2')
-rw-r--r--academic/rpy2/README4
-rw-r--r--academic/rpy2/rpy2.SlackBuild25
-rw-r--r--academic/rpy2/rpy2.info8
3 files changed, 30 insertions, 7 deletions
diff --git a/academic/rpy2/README b/academic/rpy2/README
index 62656e95fb8e8..a770dd177603e 100644
--- a/academic/rpy2/README
+++ b/academic/rpy2/README
@@ -15,3 +15,7 @@ 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)
+
+documentation:https://rpy2.github.io/doc/latest/html/index.html
diff --git a/academic/rpy2/rpy2.SlackBuild b/academic/rpy2/rpy2.SlackBuild
index 605121ff72b36..d3ee5a2f4e5ca 100644
--- a/academic/rpy2/rpy2.SlackBuild
+++ b/academic/rpy2/rpy2.SlackBuild
@@ -22,7 +22,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=rpy2
-VERSION=${VERSION:-3.2.7}
+VERSION=${VERSION:-3.3.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -58,7 +58,7 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-v$VERSION
+rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
@@ -68,9 +68,28 @@ 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 {} \;
+## make sure there is R
+if ! [ -x "$(command -v R)" ]; then
+ echo 'Error: R is not installed.' >&2
+ exit 1
+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"
+
+if ! [ "$(readelf -h $RHOMLIB/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}"
+echo "LD_LIBRARY_PATH set to ${LD_LIBRARY_PATH}"
+
python3 setup.py build install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -78,7 +97,7 @@ cp -a AUTHORS gpl-2.0.txt NEWS README* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
## to facilitate dynamic linking with R,
-## libR.so and libRblas.so need to be found
+## libR.so and libRblas.so still need to be found
## https://github.com/rpy2/rpy2/issues/675
mkdir -p $PKG/etc/ld.so.conf.d/
cat $CWD/Rlibs.conf > $PKG/etc/ld.so.conf.d/Rlibs.conf
diff --git a/academic/rpy2/rpy2.info b/academic/rpy2/rpy2.info
index a09d994c5f257..2f85d61c0dc9d 100644
--- a/academic/rpy2/rpy2.info
+++ b/academic/rpy2/rpy2.info
@@ -1,10 +1,10 @@
PRGNAM="rpy2"
-VERSION="3.2.7"
+VERSION="3.3.1"
HOMEPAGE="https://rpy2.github.io/"
-DOWNLOAD="https://pypi.python.org/packages/source/r/rpy2/rpy2-3.2.7.tar.gz"
-MD5SUM="eaa65c233eb2d60678dabe2b58894aa4"
+DOWNLOAD="https://pypi.python.org/packages/source/r/rpy2/rpy2-3.3.1.tar.gz"
+MD5SUM="5ff6f3049d5c9d5a23266e27300d0ca0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="R cffi Jinja2 pytest simplegeneric tzlocal"
+REQUIRES="R cffi Jinja2 pytest tzlocal"
MAINTAINER="Rob van Nues"
EMAIL="sborg63@disroot.org"