-
Notifications
You must be signed in to change notification settings - Fork 22
/
configure
executable file
·34 lines (26 loc) · 949 Bytes
/
configure
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
#!/bin/sh
./cleanup
# where R_HOME is available prepend it to the path to ensure
# that we are using the version of R used to install this package
# for the R commands within this script.
if [ -d "$R_HOME/bin" ]; then
PATH="$R_HOME/bin:$PATH"
fi
echo "library('reticulate')" > testPip.R
echo "library('rjson')" > testPip.R
echo "reticulate::py_run_string('import pip')" >> testPip.R
R --slave < testPip.R
rm testPip.R
if [ $? -eq 1 ]
then
echo "ERROR: Missing system dependencies. Please see: https://r-docs.synapse.org/articles/systemDependencies.html"
exit 1
fi
# exit immediately if any step fails
set -e
export PWD_FROM_R=${ALT_PWD-`pwd`}
# This code is for linking the package to the R Python client
Rscript --vanilla tools/installPythonClient.R $PWD_FROM_R
# build the .Rd files
# Note: We want to just call 'tools/createRdFiles.R .' but it doesn't work on cygwin (Windows)
Rscript --vanilla tools/createRdFiles.R $PWD_FROM_R