Skip to content

Commit

Permalink
Add stub documentation page for RInterface when R or libffi missing
Browse files Browse the repository at this point in the history
  • Loading branch information
d-torrance authored and mahrud committed Aug 27, 2024
1 parent 4a040f2 commit 5db7db6
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions M2/Macaulay2/packages/RInterface.m2
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ newPackage("RInterface",
AuxiliaryFiles => true,
PackageImports => {"ForeignFunctions"})

if not (options currentPackage).OptionalComponentsPresent
then (
printerr "warning: R cannot be found; ending";

endpkg = msg -> (
document {Key => RInterface,
Headline => (options currentPackage).Headline,
"Warning: RInterface was loaded without key components."};
printerr("warning: ", msg, "; ending");
end)

if not (options currentPackage).OptionalComponentsPresent
then endpkg "R cannot be found"

if not ForeignFunctions#"private dictionary"#?"foreignFunction"
then (
printerr "warning: foreign function interface is not available; ending";
end)
then endpkg "foreign function interface is not available"

export {
-- types
Expand Down

0 comments on commit 5db7db6

Please sign in to comment.