From 27c4a23727c981505724db7a21bcfdc5db56dfe8 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sat, 17 Aug 2024 01:55:09 -0400 Subject: Add python_package_exists() function * Poll pypi.org or compatible index to see if a package exists * Returns non-zero on success --- include/conda.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/conda.h b/include/conda.h index d439371..169bc58 100644 --- a/include/conda.h +++ b/include/conda.h @@ -7,6 +7,7 @@ #include "core.h" #define CONDA_INSTALL_PREFIX "conda" +#define PYPI_INDEX_DEFAULT "https://pypi.org/simple" struct MicromambaInfo { char *micromamba_prefix; @@ -181,4 +182,7 @@ int conda_env_export(char *name, char *output_dir, char *output_filename); * @return exit code from "conda" */ int conda_index(const char *path); + +int python_package_exists(const char *index_url, const char *name, const char *version); + #endif //STASIS_CONDA_H -- cgit