mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
71 lines
1.6 KiB
Bash
71 lines
1.6 KiB
Bash
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
|
|
# Contributor: Guoyi Zhang <guoyizhang at malacology dot net>
|
|
# Contributor: Robert Greener <me@r0bert.dev>
|
|
|
|
_pkgname=reticulate
|
|
_pkgver=1.41.0
|
|
pkgname=r-${_pkgname,,}
|
|
pkgver=${_pkgver//-/.}
|
|
pkgrel=1
|
|
pkgdesc="Interface to 'Python'"
|
|
arch=(x86_64)
|
|
url="https://cran.r-project.org/package=$_pkgname"
|
|
license=('Apache-2.0')
|
|
depends=(
|
|
python
|
|
r-here
|
|
r-jsonlite
|
|
r-png
|
|
r-rappdirs
|
|
r-rcpp
|
|
r-rcpptoml
|
|
r-rlang
|
|
r-withr
|
|
)
|
|
checkdepends=(
|
|
ipython
|
|
python-docutils
|
|
python-matplotlib
|
|
python-numpy
|
|
python-pandas
|
|
python-pipenv
|
|
python-plotly
|
|
python-poetry
|
|
python-scipy
|
|
python-tabulate
|
|
python-wrapt
|
|
r-rmarkdown
|
|
r-testthat
|
|
)
|
|
optdepends=(
|
|
"ipython: IPython console app"
|
|
"python-numpy: translation between R matrices and NumPy arrays"
|
|
r-callr
|
|
r-cli
|
|
r-glue
|
|
r-knitr
|
|
r-pillar
|
|
r-rmarkdown
|
|
r-testthat
|
|
)
|
|
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
|
|
md5sums=('51fde3c20c139a9254ec45782fe3af8a')
|
|
b2sums=('b3370b75a8a22cf8f214f04e75a6e039e3d5f94d0dc2b6b6c93f4d5b6e448aebbce3a671286c2fd3d076494337b4136df0a714fafb6448b69192e7b180a85cd3')
|
|
|
|
build() {
|
|
mkdir build
|
|
R CMD INSTALL -l build "$_pkgname"
|
|
|
|
# compile python bytecode
|
|
python -m compileall -o 0 -o 1 -s build -p /usr/lib/R/library "build/$_pkgname/python/rpytools"
|
|
}
|
|
|
|
check() {
|
|
cd "$_pkgname/tests"
|
|
R_LIBS="$srcdir/build" NOT_CRAN=true Rscript --vanilla testthat.R
|
|
}
|
|
|
|
package() {
|
|
install -d "$pkgdir/usr/lib/R/library"
|
|
cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
|
|
}
|