R CMD Check Fails for arcgisbinding

444
2
Jump to solution
04-03-2023 01:53 PM
HarunCelikOtto
New Contributor

Hello,

I'm developing a small package in R (4.2.2) to help with joining together the ArcGIS initialization and `arcpy` environment setup in R and have trouble getting R-CMD-Check to pass on GitHub without error:

Error:
! error in pak subprocess
Caused by error:
! Could not solve package dependencies:
* deps::.: Can't install dependency arcgisbinding (>= 1.0.1.300)

* arcgisbinding: Can't find package called arcgisbinding.


R-CMD-Check.yaml is running as 'windows-latest' and in my DESCRIPTION file I have `arcgisbinding` set under Imports: with the Remotes: set to R-ARCGIS/r-bridge like this.

 

Imports:

arcgisbinding (>= 1.0.1.300)

Remotes:

R-ArcGIS/r-bridge


How can I successfully pass an R-CMD-Check with the `arcgisbinding` package as an Import?

 

0 Kudos
1 Solution

Accepted Solutions
ShaunWalbridge
Esri Regular Contributor

Hello Harun!

Yes, we've been working internally on making initializing ArcPy easier from within the package, hopefully will have something soon to share on that front. That said, to get you going with what you're working on,  I think the issue you're facing has to do with the fact that arcgisbinding is only available as a binary and the CMD CHECK resolver expects that all packages will be available as source installable on all platforms, which isn't the case for arcgisbinding. Probably the simplest workaround is to add the dependency to the Suggests section and set the environment variable _R_CHECK_FORCE_SUGGESTS to false in order for it to skip it for package validation.

Cheers, Shaun

View solution in original post

2 Replies
ShaunWalbridge
Esri Regular Contributor

Hello Harun!

Yes, we've been working internally on making initializing ArcPy easier from within the package, hopefully will have something soon to share on that front. That said, to get you going with what you're working on,  I think the issue you're facing has to do with the fact that arcgisbinding is only available as a binary and the CMD CHECK resolver expects that all packages will be available as source installable on all platforms, which isn't the case for arcgisbinding. Probably the simplest workaround is to add the dependency to the Suggests section and set the environment variable _R_CHECK_FORCE_SUGGESTS to false in order for it to skip it for package validation.

Cheers, Shaun

HarunCelikOtto
New Contributor

Thank you very much Shaun.

 

I guess I'll have to skip the suggestion check then. Just out of curiosity with regards to the initialization of ArcPy, is there a plan to use reticulate or something more internal?

0 Kudos