diff --git a/DESCRIPTION b/DESCRIPTION index ede054c..4f76bae 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: argparse Type: Package Title: Command Line Optional and Positional Argument Parser -Version: 2.1.0 +Version: 2.1.1 Authors@R: c(person("Trevor L", "Davis", role=c("aut", "cre"), email="trevor.l.davis@gmail.com"), person("Allen", "Day", role="ctb", comment="Some documentation and examples ported from the getopt package."), person("Python Software Foundation", role="ctb", comment="Some documentation from the optparse Python module."), diff --git a/R/argparse.R b/R/argparse.R index 3194934..a9e44cd 100644 --- a/R/argparse.R +++ b/R/argparse.R @@ -313,9 +313,8 @@ assert_python_cmd <- function(python_cmd) { } detects_python <- function() { - python_cmd <- find_python_cmd() - findpython::is_python_sufficient(python_cmd, - required_modules = c("argparse", "json | simplejson")) + python_cmd <- try(find_python_cmd()) + !inherits(python_cmd, "try-error") } # Internal function to find python cmd diff --git a/cran-comments.rst b/cran-comments.rst index 719a95b..c70513e 100644 --- a/cran-comments.rst +++ b/cran-comments.rst @@ -1,5 +1,9 @@ ## Notes +* The examples and unit tests are now skipped if an appropriate + version of Python is not found as with the 'r-devel-windows-x86_64-gcc10-UCRT' + CRAN flavor. + * As in previous uploads while in a non-interactive session (i.e. in an Rscript) if ``parse_args()`` observes a help flag it will print a usage message and then call ``quit()``. Additionally if a user specifically adds