diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-06-24 10:29:48 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-06-24 10:29:48 -0400 |
commit | 2a5c9418c2043f1176ad8afb377a1d64df162bfd (patch) | |
tree | b308986f9d0a48db22d18800369ba6e9a7d5ff38 | |
parent | 8d3f0b11ce4a2acb1922ce1906e4ebeb87d4f69f (diff) | |
download | stasis-2a5c9418c2043f1176ad8afb377a1d64df162bfd.tar.gz |
Fix conda-forge builds
* Pass their .ci_support configurations to conda-build in order to fully set up their build runtime environment
-rw-r--r-- | src/delivery.c | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/delivery.c b/src/delivery.c index a7c177d..fdc2516 100644 --- a/src/delivery.c +++ b/src/delivery.c @@ -1035,22 +1035,30 @@ int delivery_build_recipes(struct Delivery *ctx) { } char command[PATH_MAX]; - if (RECIPE_TYPE_CONDA_FORGE == recipe_type) { - char selector[STASIS_NAME_MAX] = {0}; - sprintf(selector, "%s_", ctx->system.platform[DELIVERY_PLATFORM]); - if (strstr(ctx->system.arch, "64")) { - strcat(selector, "64"); - } else if (strstr(ctx->system.arch, "arm64")) { - strcat(selector, "arm64"); + char arch[STASIS_NAME_MAX] = {0}; + char platform[STASIS_NAME_MAX] = {0}; + + strcpy(platform, ctx->system.platform[DELIVERY_PLATFORM]); + if (strstr(platform, "Darwin")) { + memset(platform, 0, sizeof(platform)); + strcpy(platform, "osx"); + } + tolower_s(platform); + if (strstr(ctx->system.arch, "arm64")) { + strcpy(arch, "arm64"); + } else if (strstr(ctx->system.arch, "64")) { + strcpy(arch, "64"); } else { - strcat(selector, "32"); // blind guess + strcat(arch, "32"); // blind guess + } + tolower_s(arch); + + sprintf(command, "mambabuild --python=%s -m ../.ci_support/%s_%s_.yaml .", + ctx->meta.python, platform, arch); + } else { + sprintf(command, "mambabuild --python=%s .", ctx->meta.python); } - tolower_s(selector); - sprintf(command, "mambabuild --python=%s -m ../.ci_support/%s_.yaml .", ctx->meta.python, selector); - } else { - sprintf(command, "mambabuild --python=%s .", ctx->meta.python); - } status = conda_exec(command); if (status) { return -1; |