Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 73 additions & 10 deletions academic/rpy2/README
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Python interface to the R language.
Python -> R bridge

rpy2 is running an embedded R, providing access to it
from Python using R's own C-API through either:
rpy2 is an interface to R running embedded in a Python process.

1) a high-level interface making R functions and objects
just like Python functions and providing a seamless
Expand All @@ -12,13 +11,77 @@ conversion to numpy and pandas data structures
It is also providing features for when working with
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)
Building the package - see also the rpy2.Slackbuild:
Remove installed rpy2 before building and upgrading to a new
version.

Remove installed rpy2 before building and upgrading to a new version.
R needs to be compiled with the shared library flag, that is:
build R on SBo with `R_SHLIB=yes` and `BLAS_SHLIB=yes`, now
the default for R at SBo.

For linking to R, the path to installed R-libraries - e.g.
`/usr/lib64/R/lib` - has to be exported. This is done by
having this path in a `Rlibs.conf` file that is placed into
`/etc/ld.so.conf.d/` during installation of the package via a
`doinst.sh`. Because the $LIBDIRSUFFIX defines this path,
the 'doinst.sh' is generated when running the rpy2.Slackbuild
and directly saved to the `package-rpy2/install` folder. A
`douninst.sh` removes this file when rpy2 is uninstalled via
`removepkg`.

A utility module is included to check rpy2’s environment after
installation:
bash-5.3$ python -m rpy2.situation

Home:
https://rpy2.github.io/
Documentation:
https://rpy2.github.io/doc.html

Examples:
https://rpy2.github.io/doc/latest/html/introduction.html#examples

Quick test (with example outcomes from 3.6.7):
bash-5.3$ python3
>>> import rpy2.robjects as robjects
>>> r = robjects.r
>>> rpy2.robjects.__version__
# '3.6.5'
>>> r("print('test')")
# [1] "test"
>>> r("print(version)")
# _
# platform x86_64-slackware-linux-gnu
# arch x86_64
# os linux-gnu
# system x86_64, linux-gnu
# status
# major 4
# minor 6.1
# year 2026
# month 06
# day 24
# svn rev 90187
# language R
# version.string R version 4.6.1 (2026-06-24)
# nickname Happy Hop
>>> r("library(stats)")
>>> x = robjects.IntVector(range(10))
>>> y = r.rnorm(10)
>>> r.X11()
# <rpy2.rinterface_lib.sexp.NULLType object at 0x7fce37927010> [0]
# you see a frame "R Graphics Device # (ACTIVE)" popping up
>>> r.layout(r.matrix(robjects.IntVector([1,2,3,2]), nrow=2, ncol=2))
# <rpy2.robjects.vectors.IntVector object at 0x7fce3796d750> [13]
# R classes: ('integer',)
# [3]
>>> r.plot(r.runif(10), y, xlab="runif", ylab="foo/bar", col="red")
# <rpy2.rinterface_lib.sexp.NULLType object at 0x7fce37927010> [0]
# you see a diagram
>>> import rpy2.rinterface
>>> rpy2.rinterface.__version__ # could be missing
>>> import rpy2.situation
>>> for row in rpy2.situation.iter_info():
... print(row)
...

home:https://rpy2.github.io/
documentation:https://rpy2.github.io/doc/latest/html/index.html
2 changes: 0 additions & 2 deletions academic/rpy2/Rlibs.conf

This file was deleted.

2 changes: 0 additions & 2 deletions academic/rpy2/doinst.sh

This file was deleted.

88 changes: 71 additions & 17 deletions academic/rpy2/rpy2.SlackBuild
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SlackBuild for rpy2
#
# Copyright 2020-2024 Rob van Nues (sborg63@disroot.org)
# Copyright 2020-2026 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:
Expand All @@ -24,9 +24,15 @@
cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=rpy2
VERSION=${VERSION:-3.6.4}
BUILD=${BUILD:-1}
VERSION=${VERSION:-3.6.7}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
SRCREF=RELEASE
SRCDELIM="_"
SRCNAM=${SRCNAM:-3_6_7}
SRCVERSION=$SRCREF$SRCDELIM$SRCNAM
MODULE1=${MODULE1:-rinterface}
MODULE2=${MODULE2:-robjects}
PKGTYPE=${PKGTYPE:-tgz}

if [ -z "$ARCH" ]; then
Expand All @@ -47,16 +53,12 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi

Expand All @@ -66,8 +68,11 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
#tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.gz
#cd $PRGNAM-$VERSION
cd $PRGNAM-$SRCVERSION

chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
Expand All @@ -93,32 +98,81 @@ if ! [ "$(readelf -h $RHOMLIB/lib/libR*.so | grep DYN)" ]; then
exit 1
fi


# check where we build, on Slackware stable or on current (stable+)
OSVERSION="$(cat /etc/os-release | grep "VERSION_CODENAME" | cut -c 18-)"
PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')

if [[ $OSVERSION == "current" ]]; then
echo "Installing on current, into python$PYVER/site-packages/ "
elif [[ $OSVERSION == "stable" ]]; then
echo "Installing on stable, into python$PYVER/site-packages/ "
export PYTHONPATH=/opt/python$PYVER/site-packages/
else
echo "Stopping; $OSVERSION is not 'stable' nor 'current, sorry."
exit 1
fi

## this removes an error message from setup.py
## https://github.com/rpy2/rpy2/issues/675
export LD_LIBRARY_PATH="${RHOMLIB}/lib:${LD_LIBRARY_PATH}"
echo "LD_LIBRARY_PATH set to ${LD_LIBRARY_PATH}"

cd $PRGNAM-$MODULE1
# 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

cd ../$PRGNAM-$MODULE2
python3 -m build --no-isolation
python3 -m installer -d "$PKG" dist/*.whl

cd ..

# Remove rpaths:
for file in $(find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : 2> /dev/null) ; do
if [ ! "$(patchelf --print-rpath $file 2> /dev/null)" = "" ]; then
patchelf --remove-rpath $file
echo "\nremoved rpath-file: $file\n"
fi
done

find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM-$MODULE1
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM-$MODULE2
mkdir -p $PKG/usr/share/$PRGNAM-$VERSION/scripts
cp -a AUTHORS gpl-2.0.txt NEWS README* $PKG/usr/doc/$PRGNAM-$VERSION
cp $PRGNAM-$MODULE1/README* $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM-$MODULE1
cp $PRGNAM-$MODULE2/README* $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM-$MODULE2
cp -a scripts/* $PKG/usr/share/$PRGNAM-$VERSION/scripts
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
## to facilitate dynamic linking with R,
## 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

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
## for this, create "/etc/ld.so.conf.d/Rlibs.conf" with the line
## "/usr/lib${LIBDIRSUFFIX}/R/lib"
## via doinst.sh
# thanks to cwilling
## directly cat to package in case no w-permission on $CWD
#cat > $CWD/doinst.sh <<EOF
cat > $PKG/install/doinst.sh <<EOF
echo "/usr/lib${LIBDIRSUFFIX}/R/lib" > etc/ld.so.conf.d/Rlibs.conf
sbin/ldconfig
EOF
#cat > $CWD/douninst.sh <<EOF
cat > $PKG/install/douninst.sh <<EOF
rm etc/ld.so.conf.d/Rlibs.conf
sbin/ldconfig
EOF
#cat $CWD/doinst.sh > $PKG/install/doinst.sh
#cat douninst.sh > $PKG/install/douninst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
6 changes: 3 additions & 3 deletions academic/rpy2/rpy2.info
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PRGNAM="rpy2"
VERSION="3.6.4"
VERSION="3.6.7"
HOMEPAGE="https://rpy2.github.io/"
DOWNLOAD="https://pypi.python.org/packages/source/r/rpy2/rpy2-3.6.4.tar.gz"
MD5SUM="73a1368bc6b1e8eaef5b588daf7e02fc"
DOWNLOAD="https://github.com/rpy2/rpy2/archive/RELEASE_3_6_7/rpy2-RELEASE_3_6_7.tar.gz"
MD5SUM="7506d9e9b0996275ac55576e08e47dd7"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="R cffi python3-pytest tzlocal python3-setuptools-scm-opt"
Expand Down
14 changes: 14 additions & 0 deletions system/luckybackup/README
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,17 @@ luckybackup is a powerful, fast and reliable backup & sync tool that
relies on rsync. It is written and maintained by Loukas Avgeriou.
The program has a graphical frontend as well as a commandline
frontend.

Web links in 'About' won't connect when luckyBackup is run as root.

Inline documentation: Gui -> Help -> luckyBackup Handbook (F1)
External links give a blank page that stalls the manual; to
continue with inline documentation, restart the program.
Online documentation: https://luckybackup.sourceforge.net/manual.html

The current version, 0.5.0, has not changed for years, but the author
still provides support; see
Discussions: https://sourceforge.net/p/luckybackup/discussion/
Known bugs: https://luckybackup.sourceforge.net/bugs.html

Note, issues with lucky backup could relate to (updates of) rsync.