We move the src/ into R/ so it is a full R package. The src/ symlink does not work for R packages and installing via GitHub. This changes the symlink for Python, which seems odd, but it makes it so the R package can be installed. Unfortunately, the Python extension has a broken link for armadillo, so this is still failing:
Fixes #147 as per:
if ("Rforestry" %in% installed.packages()) {
remove.packages("Rforestry")
}
remotes::install_github("forestry-labs/Rforestry", subdir = "R")
#> Using github PAT from envvar GITHUB_PAT. Use `gitcreds::gitcreds_set()` and unset GITHUB_PAT in .Renviron (or elsewhere) if you want to use the more secure git credential store instead.
#> Downloading GitHub repo forestry-labs/Rforestry@HEAD
#> '/usr/local/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules --branch v2.10 https://github.com/pybind/pybind11.git /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//Rtmpnidk3V/remotes4c60714f8319/forestry-labs-Rforestry-c798f62/R/../Python/extension/include/pybind11
#> '/usr/local/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules --branch 12.2.x https://gitlab.com/conradsnicta/armadillo-code.git /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//Rtmpnidk3V/remotes4c60714f8319/forestry-labs-Rforestry-c798f62/R/../Python/extension/include/armadillo
#> Warning in system(full, intern = TRUE, ignore.stderr = quiet): running command
#> ''/usr/local/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules
#> --branch 12.2.x https://gitlab.com/conradsnicta/armadillo-code.git
#> /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//Rtmpnidk3V/remotes4c60714f8319/forestry-labs-Rforestry-c798f62/R/../Python/extension/include/armadillo'
#> had status 128
#> Error: Failed to install 'Rforestry' from GitHub:
#> Command failed (128)
remotes::install_github("forestry-labs/Rforestry/R")
#> Using github PAT from envvar GITHUB_PAT. Use `gitcreds::gitcreds_set()` and unset GITHUB_PAT in .Renviron (or elsewhere) if you want to use the more secure git credential store instead.
#> Downloading GitHub repo forestry-labs/Rforestry@HEAD
#> '/usr/local/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules --branch v2.10 https://github.com/pybind/pybind11.git /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//Rtmpnidk3V/remotes4c605fd5fab5/forestry-labs-Rforestry-c798f62/R/../Python/extension/include/pybind11
#> '/usr/local/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules --branch 12.2.x https://gitlab.com/conradsnicta/armadillo-code.git /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//Rtmpnidk3V/remotes4c605fd5fab5/forestry-labs-Rforestry-c798f62/R/../Python/extension/include/armadillo
#> Warning in system(full, intern = TRUE, ignore.stderr = quiet): running command
#> ''/usr/local/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules
#> --branch 12.2.x https://gitlab.com/conradsnicta/armadillo-code.git
#> /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//Rtmpnidk3V/remotes4c605fd5fab5/forestry-labs-Rforestry-c798f62/R/../Python/extension/include/armadillo'
#> had status 128
#> Error: Failed to install 'Rforestry' from GitHub:
#> Command failed (128)
remotes::install_github("muschellij2/Rforestry-base/R")
#> Using github PAT from envvar GITHUB_PAT. Use `gitcreds::gitcreds_set()` and unset GITHUB_PAT in .Renviron (or elsewhere) if you want to use the more secure git credential store instead.
#> Downloading GitHub repo muschellij2/Rforestry-base@HEAD
#> '/usr/local/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules --branch v2.10 https://github.com/pybind/pybind11.git /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//Rtmpnidk3V/remotes4c6030c920fc/muschellij2-Rforestry-base-31d3941/R/../Python/extension/include/pybind11
#> '/usr/local/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules --branch 12.4.x https://gitlab.com/conradsnicta/armadillo-code.git /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//Rtmpnidk3V/remotes4c6030c920fc/muschellij2-Rforestry-base-31d3941/R/../Python/extension/include/armadillo
#> '/usr/local/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules --branch devel https://github.com/catchorg/Catch2.git /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//Rtmpnidk3V/remotes4c6030c920fc/muschellij2-Rforestry-base-31d3941/R/../tests/cpp/include/Catch2
#> '/usr/local/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules --branch master https://github.com/Tencent/rapidjson.git /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//Rtmpnidk3V/remotes4c6030c920fc/muschellij2-Rforestry-base-31d3941/R/../R/src/rapidjson
#>
#> ── R CMD build ─────────────────────────────────────────────────────────────────
#> * checking for file ‘/private/var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T/Rtmpnidk3V/remotes4c6030c920fc/muschellij2-Rforestry-base-31d3941/R/DESCRIPTION’ ... OK
#> * preparing ‘Rforestry’:
#> * checking DESCRIPTION meta-information ... OK
#> * cleaning src
#> * checking for LF line-endings in source and make files and shell scripts
#> * checking for empty or unneeded directories
#> * building ‘Rforestry_0.10.2.tar.gz’
remotes::install_git("https://github.com/muschellij2/Rforestry-base",
subdir = "R")
#> Skipping install of 'Rforestry' from a git2r remote, the SHA1 (31d39412) has not changed since last install.
#> Use `force = TRUE` to force installation
We move the src/ into R/ so it is a full R package. The
src/
symlink does not work for R packages and installing via GitHub. This changes the symlink for Python, which seems odd, but it makes it so the R package can be installed. Unfortunately, the Python extension has a broken link for armadillo, so this is still failing:Fixes #147 as per:
Created on 2024-09-30 with reprex v2.1.1
Session info
``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.4.0 (2024-04-24) #> os macOS Sonoma 14.4.1 #> system x86_64, darwin20 #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/New_York #> date 2024-09-30 #> pandoc 3.2 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/x86_64/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> bit 4.0.5 2022-11-15 [1] CRAN (R 4.4.0) #> bit64 4.0.5 2020-08-30 [1] CRAN (R 4.4.0) #> blob 1.2.4 2023-03-17 [1] CRAN (R 4.4.0) #> cachem 1.1.0 2024-05-16 [1] CRAN (R 4.4.0) #> callr 3.7.6 2024-03-25 [1] CRAN (R 4.4.0) #> cli 3.6.3 2024-06-21 [1] CRAN (R 4.4.0) #> crancache 0.0.0.9001 2024-01-26 [1] Github (r-lib/crancache@fc51e31) #> cranlike 1.0.3 2024-04-24 [1] CRAN (R 4.4.0) #> crayon 1.5.3 2024-06-20 [1] CRAN (R 4.4.0) #> curl 5.2.1 2024-03-01 [1] CRAN (R 4.4.0) #> DBI 1.2.3 2024-06-02 [1] CRAN (R 4.4.0) #> debugme 1.2.0 2024-04-25 [1] CRAN (R 4.4.0) #> desc 1.4.3 2023-12-10 [1] CRAN (R 4.4.0) #> digest 0.6.37 2024-08-19 [1] CRAN (R 4.4.1) #> evaluate 1.0.0 2024-09-17 [1] CRAN (R 4.4.1) #> fansi 1.0.6 2023-12-08 [1] CRAN (R 4.4.0) #> fastmap 1.2.0 2024-05-15 [1] CRAN (R 4.4.0) #> fs 1.6.4 2024-04-25 [1] CRAN (R 4.4.0) #> git2r 0.33.0 2023-11-26 [1] CRAN (R 4.4.0) #> glue 1.7.0 2024-01-09 [1] CRAN (R 4.4.0) #> htmltools 0.5.8.1 2024-04-04 [1] CRAN (R 4.4.0) #> knitr 1.48 2024-07-07 [1] CRAN (R 4.4.0) #> lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.4.0) #> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.4.0) #> memoise 2.0.1 2021-11-26 [1] CRAN (R 4.4.0) #> parsedate 1.3.1 2022-10-27 [1] CRAN (R 4.4.0) #> pillar 1.9.0 2023-03-22 [1] CRAN (R 4.4.0) #> pkgbuild 1.4.4 2024-03-17 [1] CRAN (R 4.4.0) #> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.4.0) #> processx 3.8.4 2024-03-16 [1] CRAN (R 4.4.0) #> ps 1.7.7 2024-07-02 [1] CRAN (R 4.4.0) #> R6 2.5.1 2021-08-19 [1] CRAN (R 4.4.0) #> rappdirs 0.3.3 2021-01-31 [1] CRAN (R 4.4.0) #> rematch2 2.1.2 2020-05-01 [1] CRAN (R 4.4.0) #> remotes 2.5.0.9000 2024-05-24 [1] Github (r-lib/remotes@5b7eb08) #> reprex 2.1.1 2024-07-06 [1] CRAN (R 4.4.0) #> rlang 1.1.4 2024-06-04 [1] CRAN (R 4.4.0) #> rmarkdown 2.28 2024-08-17 [1] CRAN (R 4.4.1) #> RSQLite 2.3.7 2024-05-27 [1] CRAN (R 4.4.0) #> rstudioapi 0.16.0 2024-03-24 [1] CRAN (R 4.4.0) #> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.4.0) #> tibble 3.2.1 2023-03-20 [1] CRAN (R 4.4.0) #> utf8 1.2.4 2023-10-22 [1] CRAN (R 4.4.0) #> vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.4.0) #> withr 3.0.0 2024-01-16 [1] CRAN (R 4.4.0) #> xfun 0.47 2024-08-17 [1] CRAN (R 4.4.1) #> yaml 2.3.10 2024-07-26 [1] CRAN (R 4.4.0) #> #> [1] /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library #> #> ────────────────────────────────────────────────────────────────────────────── ```