aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cli/stasis/system_requirements.c16
-rw-r--r--src/lib/delivery/delivery_build.c17
2 files changed, 21 insertions, 12 deletions
diff --git a/src/cli/stasis/system_requirements.c b/src/cli/stasis/system_requirements.c
index d8d7df3..cb0ebd5 100644
--- a/src/cli/stasis/system_requirements.c
+++ b/src/cli/stasis/system_requirements.c
@@ -38,18 +38,18 @@ void check_system_requirements(struct Delivery *ctx) {
delivery_init_tmpdir(ctx);
}
- struct DockerCapabilities dcap;
- if (!docker_capable(&dcap)) {
+ if (!docker_capable(&ctx->deploy.docker.capabilities)) {
+ struct DockerCapabilities *dcap = &ctx->deploy.docker.capabilities;
msg(STASIS_MSG_L2 | STASIS_MSG_WARN, "Docker is broken\n");
- msg(STASIS_MSG_L3, "Available: %s\n", dcap.available ? "Yes" : "No");
- msg(STASIS_MSG_L3, "Usable: %s\n", dcap.usable ? "Yes" : "No");
- msg(STASIS_MSG_L3, "Podman [Docker Emulation]: %s\n", dcap.podman ? "Yes" : "No");
+ msg(STASIS_MSG_L3, "Available: %s\n", dcap->available ? "Yes" : "No");
+ msg(STASIS_MSG_L3, "Usable: %s\n", dcap->usable ? "Yes" : "No");
+ msg(STASIS_MSG_L3, "Podman [Docker Emulation]: %s\n", dcap->podman ? "Yes" : "No");
msg(STASIS_MSG_L3, "Build plugin(s): ");
- if (dcap.usable) {
- if (dcap.build & STASIS_DOCKER_BUILD) {
+ if (dcap->usable) {
+ if (dcap->build & STASIS_DOCKER_BUILD) {
printf("build ");
}
- if (dcap.build & STASIS_DOCKER_BUILD_X) {
+ if (dcap->build & STASIS_DOCKER_BUILD_X) {
printf("buildx ");
}
puts("");
diff --git a/src/lib/delivery/delivery_build.c b/src/lib/delivery/delivery_build.c
index d1239e4..2f31b33 100644
--- a/src/lib/delivery/delivery_build.c
+++ b/src/lib/delivery/delivery_build.c
@@ -193,10 +193,19 @@ struct StrList *delivery_build_wheels(struct Delivery *ctx) {
return NULL;
}
- if (!strcmp(ctx->system.platform[DELIVERY_PLATFORM], "Linux")) {
- asprintf(&cmd, "-m cibuildwheel --output-dir %s --only cp%s-manylinux_%s", outdir, ctx->meta.python_compact, ctx->system.arch);
- } else {
- asprintf(&cmd, "-m build -w -o %s", outdir);
+ if (asprintf(&cmd, "-m build -w -o %s", outdir) < 0) {
+ SYSERROR("%s", "Unable to allocate memory for build command");
+ return NULL;
+ }
+ if (!strcmp(ctx->system.platform[DELIVERY_PLATFORM], "Linux")
+ && globals.enable_docker
+ && ctx->deploy.docker.capabilities.usable) {
+ guard_free(cmd);
+ if (asprintf(&cmd, "-m cibuildwheel --output-dir %s --only cp%s-manylinux_%s",
+ outdir, ctx->meta.python_compact, ctx->system.arch) < 0) {
+ SYSERROR("%s", "Unable to allocate memory for cibuildwheel command");
+ return NULL;
+ }
}
if (python_exec(cmd)) {