academic/rpy2: Updated for version 3.3.1.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Rob van Nues 2020-04-24 08:04:37 +07:00 committed by Willy Sudiarto Raharjo
parent f30839492c
commit 1cae110520
3 changed files with 30 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -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"