diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2024-10-14 12:47:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-14 12:47:03 -0400 |
commit | ca762e2fd21266e6ed7b800d135e386c2ec48861 (patch) | |
tree | 48978ff793f2a969df196cfa7700100e5c82a2f5 /include | |
parent | 20a4c8c1707055c6d53265213f2a2d6b834aa037 (diff) | |
parent | 26000fb8e6cc08c227d4463de60e28881179e5cb (diff) | |
download | stasis-ca762e2fd21266e6ed7b800d135e386c2ec48861.tar.gz |
Merge pull request #61 from jhunkeler/restructure-the-world
Restructure the world
Diffstat (limited to 'include')
-rw-r--r-- | include/artifactory.h | 1 | ||||
-rw-r--r-- | include/conda.h | 2 | ||||
-rw-r--r-- | include/core.h | 22 | ||||
-rw-r--r-- | include/core_mem.h | 3 | ||||
-rw-r--r-- | include/delivery.h | 9 | ||||
-rw-r--r-- | include/docker.h | 2 | ||||
-rw-r--r-- | include/download.h | 2 | ||||
-rw-r--r-- | include/envctl.h | 1 | ||||
-rw-r--r-- | include/ini.h | 1 | ||||
-rw-r--r-- | include/package.h | 30 | ||||
-rw-r--r-- | include/str.h | 1 | ||||
-rw-r--r-- | include/strlist.h | 5 | ||||
-rw-r--r-- | include/utils.h | 7 |
13 files changed, 63 insertions, 23 deletions
diff --git a/include/artifactory.h b/include/artifactory.h index c6e5c2b..e580886 100644 --- a/include/artifactory.h +++ b/include/artifactory.h @@ -5,6 +5,7 @@ #include <stdio.h> #include <stdlib.h> #include "core.h" +#include "download.h" //! JFrog Artifactory Authentication struct struct JFRT_Auth { diff --git a/include/conda.h b/include/conda.h index b26c7a3..1eb42f4 100644 --- a/include/conda.h +++ b/include/conda.h @@ -4,7 +4,9 @@ #include <stdio.h> #include <string.h> +#include <sys/utsname.h> #include "core.h" +#include "download.h" #define CONDA_INSTALL_PREFIX "conda" #define PYPI_INDEX_DEFAULT "https://pypi.org/simple" diff --git a/include/core.h b/include/core.h index 972e1ee..b0a1a11 100644 --- a/include/core.h +++ b/include/core.h @@ -4,6 +4,7 @@ #include <stdio.h> #include <stdlib.h> +#include <stdbool.h> #include <string.h> #include <limits.h> #include <unistd.h> @@ -22,27 +23,6 @@ #include "config.h" #include "core_mem.h" -#include "multiprocessing.h" -#include "envctl.h" -#include "template.h" -#include "utils.h" -#include "copy.h" -#include "ini.h" -#include "conda.h" -#include "environment.h" -#include "artifactory.h" -#include "docker.h" -#include "delivery.h" -#include "str.h" -#include "strlist.h" -#include "system.h" -#include "download.h" -#include "recipe.h" -#include "relocation.h" -#include "wheel.h" -#include "junitxml.h" -#include "github.h" -#include "template_func_proto.h" #define COE_CHECK_ABORT(COND, MSG) \ do {\ diff --git a/include/core_mem.h b/include/core_mem.h index 87a2a2f..bd50e9d 100644 --- a/include/core_mem.h +++ b/include/core_mem.h @@ -2,6 +2,9 @@ #ifndef STASIS_CORE_MEM_H #define STASIS_CORE_MEM_H +#include "environment.h" +#include "strlist.h" + #define guard_runtime_free(X) do { if (X) { runtime_free(X); X = NULL; } } while (0) #define guard_strlist_free(X) do { if ((*X)) { strlist_free(X); (*X) = NULL; } } while (0) #define guard_free(X) do { if (X) { free(X); X = NULL; } } while (0) diff --git a/include/delivery.h b/include/delivery.h index 15cde13..bd5137c 100644 --- a/include/delivery.h +++ b/include/delivery.h @@ -10,6 +10,15 @@ #include <fnmatch.h> #include <sys/statvfs.h> #include "core.h" +#include "copy.h" +#include "environment.h" +#include "conda.h" +#include "ini.h" +#include "artifactory.h" +#include "docker.h" +#include "wheel.h" +#include "multiprocessing.h" +#include "recipe.h" #define DELIVERY_PLATFORM_MAX 4 #define DELIVERY_PLATFORM_MAXLEN 65 diff --git a/include/docker.h b/include/docker.h index ff8a8d5..7585d86 100644 --- a/include/docker.h +++ b/include/docker.h @@ -2,6 +2,8 @@ #ifndef STASIS_DOCKER_H #define STASIS_DOCKER_H +#include "core.h" + //! Flag to squelch output from docker_exec() #define STASIS_DOCKER_QUIET 1 << 1 diff --git a/include/download.h b/include/download.h index 058812e..0b6311e 100644 --- a/include/download.h +++ b/include/download.h @@ -2,6 +2,8 @@ #ifndef STASIS_DOWNLOAD_H #define STASIS_DOWNLOAD_H +#include <stdlib.h> +#include <string.h> #include <curl/curl.h> size_t download_writer(void *fp, size_t size, size_t nmemb, void *stream); diff --git a/include/envctl.h b/include/envctl.h index 1536938..659cae3 100644 --- a/include/envctl.h +++ b/include/envctl.h @@ -3,6 +3,7 @@ #define STASIS_ENVCTL_H #include <stdlib.h> +#include "core.h" #define STASIS_ENVCTL_PASSTHRU 0 #define STASIS_ENVCTL_REQUIRED 1 << 1 diff --git a/include/ini.h b/include/ini.h index 3d0565b..557f157 100644 --- a/include/ini.h +++ b/include/ini.h @@ -5,6 +5,7 @@ #include <stdio.h> #include <stddef.h> #include <stdbool.h> +#include "template.h" #define INI_WRITE_RAW 0 ///< Dump INI data. Contents are not modified. #define INI_WRITE_PRESERVE 1 ///< Dump INI data. Template strings are diff --git a/include/package.h b/include/package.h new file mode 100644 index 0000000..eff1874 --- /dev/null +++ b/include/package.h @@ -0,0 +1,30 @@ +#ifndef STASIS_PACKAGE_H +#define STASIS_PACKAGE_H + +struct Package { + struct { + const char *name; + const char *version_spec; + const char *version; + } meta; + struct { + const char *uri; + unsigned handler; + } source; + struct { + struct Test *test; + size_t pass; + size_t fail; + size_t skip; + }; + unsigned state; +}; + +struct Package *stasis_package_init(void); +void stasis_package_set_name(struct Package *pkg, const char *name); +void stasis_package_set_version(struct Package *pkg, const char *version); +void stasis_package_set_version_spec(struct Package *pkg, const char *version_spec); +void stasis_package_set_uri(struct Package *pkg, const char *uri); +void stasis_package_set_handler(struct Package *pkg, unsigned handler); + +#endif //STASIS_PACKAGE_H diff --git a/include/str.h b/include/str.h index 4cf221d..7254225 100644 --- a/include/str.h +++ b/include/str.h @@ -9,6 +9,7 @@ #include <string.h> #include <stdarg.h> #include <ctype.h> +#include "relocation.h" #include "core.h" #define STASIS_SORT_ALPHA 1 << 0 diff --git a/include/strlist.h b/include/strlist.h index dd22a0a..cdbfc01 100644 --- a/include/strlist.h +++ b/include/strlist.h @@ -4,10 +4,15 @@ */ #ifndef STASIS_STRLIST_H #define STASIS_STRLIST_H + +typedef int (ReaderFn)(size_t line, char **); + #include <stdlib.h> +#include "core.h" #include "utils.h" #include "str.h" + struct StrList { size_t num_alloc; size_t num_inuse; diff --git a/include/utils.h b/include/utils.h index 4f7c3a4..4ade817 100644 --- a/include/utils.h +++ b/include/utils.h @@ -8,7 +8,12 @@ #include <unistd.h> #include <limits.h> #include <errno.h> +#include "core.h" +#include "copy.h" #include "system.h" +#include "strlist.h" +#include "utils.h" +#include "ini.h" #if defined(STASIS_OS_WINDOWS) #define PATH_ENV_VAR "path" @@ -25,8 +30,6 @@ #define STASIS_XML_PRETTY_PRINT_PROG "xmllint" #define STASIS_XML_PRETTY_PRINT_ARGS "--format" -typedef int (ReaderFn)(size_t line, char **); - /** * Change directory. Push path on directory stack. * |