STASIS
A pipeline delivery generator
Loading...
Searching...
No Matches
conda.h
Go to the documentation of this file.
1
2#ifndef STASIS_CONDA_H
3#define STASIS_CONDA_H
4
5#include <stdio.h>
6#include <string.h>
7#include <sys/utsname.h>
8#include "core.h"
9#include "download.h"
10
11#define CONDA_INSTALL_PREFIX "conda"
12#define PYPI_INDEX_DEFAULT "https://pypi.org/simple"
13
14#define PKG_USE_PIP 0
15#define PKG_USE_CONDA 1
16
17#define PKG_NOT_FOUND 0
18#define PKG_FOUND 1
19
20#define PKG_INDEX_PROVIDES_ERROR_MESSAGE_OFFSET (-10)
21#define PKG_E_SUCCESS (PKG_INDEX_PROVIDES_ERROR_MESSAGE_OFFSET + 0)
22#define PKG_INDEX_PROVIDES_E_INTERNAL_MODE_UNKNOWN (PKG_INDEX_PROVIDES_ERROR_MESSAGE_OFFSET + 1)
23#define PKG_INDEX_PROVIDES_E_INTERNAL_LOG_HANDLE (PKG_INDEX_PROVIDES_ERROR_MESSAGE_OFFSET + 2)
24#define PKG_INDEX_PROVIDES_E_MANAGER_RUNTIME (PKG_INDEX_PROVIDES_ERROR_MESSAGE_OFFSET + 3)
25#define PKG_INDEX_PROVIDES_E_MANAGER_SIGNALED (PKG_INDEX_PROVIDES_ERROR_MESSAGE_OFFSET + 4)
26#define PKG_INDEX_PROVIDES_E_MANAGER_EXEC (PKG_INDEX_PROVIDES_ERROR_MESSAGE_OFFSET + 5)
27#define PKG_INDEX_PROVIDES_FAILED(ECODE) ((ECODE) <= PKG_INDEX_PROVIDES_ERROR_MESSAGE_OFFSET)
28
34
42int micromamba(const struct MicromambaInfo *info, char *command, ...);
43
58int python_exec(const char *args);
59
74int pip_exec(const char *args);
75
90int conda_exec(const char *args);
91
106int conda_activate(const char *root, const char *env_name);
107
112
131int conda_env_create_from_uri(char *name, char *uri, char *python_version);
132
155int conda_env_create(char *name, char *python_version, char *packages);
156
170int conda_env_remove(char *name);
171
187int conda_env_export(char *name, char *output_dir, char *output_filename);
188
202int conda_index(const char *path);
203
229int pkg_index_provides(int mode, const char *index, const char *spec, const char *logdir);
230const char *pkg_index_provides_strerror(int code);
231
232char *conda_get_active_environment();
233
234int conda_env_exists(const char *root, const char *name);
235
236#endif //STASIS_CONDA_H
int pip_exec(const char *args)
Definition conda.c:124
int conda_env_create(char *name, char *python_version, char *packages)
Definition conda.c:648
int conda_env_export(char *name, char *output_dir, char *output_filename)
Definition conda.c:669
int conda_env_remove(char *name)
Definition conda.c:663
int conda_index(const char *path)
Definition conda.c:690
int conda_activate(const char *root, const char *env_name)
Definition conda.c:363
int conda_env_create_from_uri(char *name, char *uri, char *python_version)
Definition conda.c:595
int conda_exec(const char *args)
Definition conda.c:257
int pkg_index_provides(int mode, const char *index, const char *spec, const char *logdir)
Definition conda.c:153
int python_exec(const char *args)
Definition conda.c:109
int micromamba(const struct MicromambaInfo *info, char *command,...)
Definition conda.c:7
int conda_setup_headless()
Definition conda.c:511
Definition conda.h:29
char * conda_prefix
Path to install conda base tree.
Definition conda.h:31
char * micromamba_prefix
Path to write micromamba binary.
Definition conda.h:30
char * download_dir
Path to store micromamba installer.
Definition conda.h:32