aboutsummaryrefslogtreecommitdiff
path: root/include/conda.h
Commit message (Collapse)AuthorAgeFilesLines
* Attempt conda environment removal only when its present on-diskworkaround-shebang-nightmareJoseph Hunkeler2024-11-131-0/+2
|
* Generalize *_index_provides interfaceJoseph Hunkeler2024-10-241-10/+37
| | | | | * Replaces conda_* and pip_* with pkg_index_provides * Because this function can fail in so many ways I've added pkg_index_provides_strerror() and a detection macro PKG_INDEX_PROVIDES_FAILED() to make things easier
* Fix includesJoseph Hunkeler2024-10-141-0/+2
|
* Fix/add header documentationfix-bare-package-argumentsJoseph Hunkeler2024-10-071-4/+7
|
* pip_index_provides does not need a separate versionJoseph Hunkeler2024-10-071-1/+1
| | | | * To be more aligned with conda_provides, the version spec has been consolidated into one argument
* Add conda_get_active_environment() functionconda-get-active-environmentJoseph Hunkeler2024-10-041-0/+5
|
* Pypi existence check (#30)Joseph Hunkeler2024-08-201-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add python_package_exists() function * Poll pypi.org or compatible index to see if a package exists * Returns non-zero on success * Implements python_package_exists() in delivery_defer_packages() * Implements python_package_exists() in delivery_defer_packages() * Bugfix: Avoid incorrect package selection * With large package lists that contain multiple packages starting with the same strstr() would pick the first match * This adds a temporary name variable that strcmp() can check against. * Message correction: * Change "release" to "testing" in testing environment failure message * Amend message to fit the flow of the output * Disable outdated conda notifications * The latest version isn't always the greatest. Don't give the end-user any ideas. Just use whatever the installer provides... quietly * Rename python_package_exists to pip_index_provides * Document the function prototype * Add missing comments in micromamba structure * Ensure the temporary output file does not linger
* Unit tests (#12)Joseph Hunkeler2024-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change return value of conda_setup_headless() from void to int * Replace exit() with return; * Return early if unpacking the micromamba binary fails * Exit program when pointer to INIFILE is NULL. * Validation function cannot otherwise proceed * The way the logic is set up I've decided to duplicate the installation code for now until I find time to revise it * The only meaningful difference between a "fresh start" and reusing the conda installation is a rmtree(). * Exposes STASIS_DOWNLOAD_TIMEOUT environment variable * Sets the connection timeout for libcurl to 30, instead of 300. * Export ini_section_create() function * Add download() tests * Add conda_*() tests * Add boilerplate source file for test framework * Fixes segfault reported by @GeorgeJCleary (#10) * The key is now an array index. When key is -1, the env variable is not defined. * Free resources only when continue on error is disabled (#11) * Fix segfault due to premature shutdown/cleanup * If conda_setup_headless cannot succeed, die * Set STASIS_SYSCONFDIR for tests
* Pass .ci_support/plat_arch_.yaml to conda-build (#8)Joseph Hunkeler2024-06-241-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Pass .ci_support/plat_arch_.yaml to conda-build * Fixes a few outstanding leaks in delivery context * Move micromamba function out of stasis_indexer.c * Adjust code in the indexer to accommodate the move. The function now expects a MicromambaInfo structure as its first argument. * Add missing warning message * User is informed when pandoc is not available for HTML page generation * Initialize workdir_template string to zero * Add micromamba program to runtime PATH * Expose storage.tools_dir to template engine * Remove dead code * Fix wording in comment * Fix conda-forge builds * Pass their .ci_support configurations to conda-build in order to fully set up their build runtime environment * Add get_cpu_count() * Exposes STASIS_CPU_COUNT and CPU_COUNT to the runtime environment * Implements conda reactivation template string * {{ workaround.conda_reactivate }} * This is useful to call after installing any conda packages within a test.script * Fix conda runtime inside of test.script * This ensures conda and mamba are fully initialized. * Previous behavior only placed the commands on the PATH but didn't provide any shell macros (i.e. undefined behavior) * Document CPU_COUNT and workaround.conda_reactivate
* Rebrand OhMyCal (OMC) as STASIS (#7)Joseph Hunkeler2024-06-211-4/+4
|
* Document functions and usageJoseph Hunkeler2024-02-281-4/+150
|
* Implements slightly improved error handlingJoseph Hunkeler2023-11-201-4/+4
| | | | | | | * Return status from conda_ and delivery_ functions * Caller prints meaningful error, and handles it * Enable warnings during compilation * Squelch format-truncation warning -- those strings are extremely unlikely to overflow (famous last words)
* Rebrand for the last timeJoseph Hunkeler2023-11-201-4/+4
| | | | | * Shorten OHMYCAL to OMC * Rename ohmycal.h to omc.h
* Consolidate conda_setup_headless() from main.cJoseph Hunkeler2023-10-311-0/+1
|
* Initial commitJoseph Hunkeler2023-10-261-0/+23