blob: beed8bb31ee0113e11a6aded93db4d77115d62d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# 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.44.1
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=('764f9eee4b8ca45461fc53d94b23f0ad')
b2sums=('fddf40cddbff4eeee3793b96653cdda599d207f7d7351ad95101881ba95f3a840c2cbd5c250278b856cf1b9025678d53c8b68a7107365e87c0340794b1867f18')
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"
}
|