diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml deleted file mode 100755 index a2b6289..0000000 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ /dev/null @@ -1,60 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yml and/or the recipe/meta.yaml. -# -*- mode: yaml -*- - -jobs: -- job: linux - pool: - vmImage: ubuntu-latest - strategy: - matrix: - linux_64_python3.10.____cpython: - CONFIG: linux_64_python3.10.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - linux_64_python3.11.____cpython: - CONFIG: linux_64_python3.11.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - linux_64_python3.12.____cpython: - CONFIG: linux_64_python3.12.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - linux_64_python3.13.____cp313: - CONFIG: linux_64_python3.13.____cp313 - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - linux_64_python3.14.____cp314: - CONFIG: linux_64_python3.14.____cp314 - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - timeoutInMinutes: 360 - variables: {} - - steps: - # configure qemu binfmt-misc running. This allows us to run docker containers - # embedded qemu-static - - script: | - docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes - ls /proc/sys/fs/binfmt_misc/ - condition: not(startsWith(variables['CONFIG'], 'linux_64')) - displayName: Configure binfmt_misc - - - script: | - export CI=azure - export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) - export remote_url=$(Build.Repository.Uri) - export sha=$(Build.SourceVersion) - export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME - export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) - if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then - export IS_PR_BUILD="True" - else - export IS_PR_BUILD="False" - fi - .scripts/run_docker_build.sh - displayName: Run docker build - env: - BINSTAR_TOKEN: $(BINSTAR_TOKEN) - FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml new file mode 100755 index 0000000..0f4bcf4 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -0,0 +1,44 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: osx + pool: + vmImage: $(VMIMAGE) + strategy: + matrix: + osx_64_is_python_mintruepython3.10.____cpython: + CONFIG: osx_64_is_python_mintruepython3.10.____cpython + UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 + store_build_artifacts: false + osx_arm64_is_python_mintruepython3.10.____cpython: + CONFIG: osx_arm64_is_python_mintruepython3.10.____cpython + UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15-arm64 + store_build_artifacts: false + timeoutInMinutes: 360 + variables: {} + + steps: + # TODO: Fast finish on azure pipelines? + - script: | + export CI=azure + export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) + export remote_url=$(Build.Repository.Uri) + export sha=$(Build.SourceVersion) + export OSX_FORCE_SDK_DOWNLOAD="1" + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + ./.scripts/run_osx_build.sh + displayName: Run OSX build + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 2adcb90..c977cd7 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -8,21 +8,10 @@ jobs: vmImage: windows-2022 strategy: matrix: - win_64_python3.10.____cpython: - CONFIG: win_64_python3.10.____cpython - UPLOAD_PACKAGES: 'True' - win_64_python3.11.____cpython: - CONFIG: win_64_python3.11.____cpython - UPLOAD_PACKAGES: 'True' - win_64_python3.12.____cpython: - CONFIG: win_64_python3.12.____cpython - UPLOAD_PACKAGES: 'True' - win_64_python3.13.____cp313: - CONFIG: win_64_python3.13.____cp313 - UPLOAD_PACKAGES: 'True' - win_64_python3.14.____cp314: - CONFIG: win_64_python3.14.____cp314 + win_64_is_python_mintruepython3.10.____cpython: + CONFIG: win_64_is_python_mintruepython3.10.____cpython UPLOAD_PACKAGES: 'True' + store_build_artifacts: false timeoutInMinutes: 360 variables: CONDA_BLD_PATH: D:\\bld\\ diff --git a/.ci_support/linux_64_python3.10.____cpython.yaml b/.ci_support/linux_64_is_python_mintruepython3.10.____cpython.yaml similarity index 89% rename from .ci_support/linux_64_python3.10.____cpython.yaml rename to .ci_support/linux_64_is_python_mintruepython3.10.____cpython.yaml index 9c7fab0..4a0f4cb 100644 --- a/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/.ci_support/linux_64_is_python_mintruepython3.10.____cpython.yaml @@ -16,6 +16,10 @@ cxx_compiler_version: - '14' docker_image: - quay.io/condaforge/linux-anvil-x86_64:alma9 +is_abi3: +- true +is_python_min: +- true pin_run_as_build: python: min_pin: x.x @@ -28,4 +32,4 @@ zip_keys: - - c_compiler_version - cxx_compiler_version - - python - - channel_sources + - is_python_min diff --git a/.ci_support/linux_64_python3.14.____cp314.yaml b/.ci_support/linux_64_python3.14.____cp314.yaml deleted file mode 100644 index ad68ec7..0000000 --- a/.ci_support/linux_64_python3.14.____cp314.yaml +++ /dev/null @@ -1,31 +0,0 @@ -c_compiler: -- gcc -c_compiler_version: -- '14' -c_stdlib: -- sysroot -c_stdlib_version: -- '2.17' -channel_sources: -- conda-forge,conda-forge/label/python_rc -channel_targets: -- conda-forge main -cxx_compiler: -- gxx -cxx_compiler_version: -- '14' -docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.14.* *_cp314 -target_platform: -- linux-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -- - python - - channel_sources diff --git a/.ci_support/linux_64_python3.13.____cp313.yaml b/.ci_support/linux_aarch64_is_python_mintruepython3.10.____cpython.yaml similarity index 73% rename from .ci_support/linux_64_python3.13.____cp313.yaml rename to .ci_support/linux_aarch64_is_python_mintruepython3.10.____cpython.yaml index 589ff43..1a2949f 100644 --- a/.ci_support/linux_64_python3.13.____cp313.yaml +++ b/.ci_support/linux_aarch64_is_python_mintruepython3.10.____cpython.yaml @@ -15,17 +15,21 @@ cxx_compiler: cxx_compiler_version: - '14' docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 +- quay.io/condaforge/linux-anvil-aarch64:alma9 +is_abi3: +- true +is_python_min: +- true pin_run_as_build: python: min_pin: x.x max_pin: x.x python: -- 3.13.* *_cp313 +- 3.10.* *_cpython target_platform: -- linux-64 +- linux-aarch64 zip_keys: - - c_compiler_version - cxx_compiler_version - - python - - channel_sources + - is_python_min diff --git a/.ci_support/linux_64_python3.11.____cpython.yaml b/.ci_support/osx_64_is_python_mintruepython3.10.____cpython.yaml similarity index 55% rename from .ci_support/linux_64_python3.11.____cpython.yaml rename to .ci_support/osx_64_is_python_mintruepython3.10.____cpython.yaml index 7639ff7..0b60dee 100644 --- a/.ci_support/linux_64_python3.11.____cpython.yaml +++ b/.ci_support/osx_64_is_python_mintruepython3.10.____cpython.yaml @@ -1,31 +1,39 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' c_compiler: -- gcc +- clang c_compiler_version: -- '14' +- '19' c_stdlib: -- sysroot +- macosx_deployment_target c_stdlib_version: -- '2.17' +- '11.0' channel_sources: - conda-forge channel_targets: - conda-forge main cxx_compiler: -- gxx +- clangxx cxx_compiler_version: -- '14' -docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 +- '19' +is_abi3: +- true +is_python_min: +- true +macos_machine: +- x86_64-apple-darwin13.4.0 pin_run_as_build: python: min_pin: x.x max_pin: x.x python: -- 3.11.* *_cpython +- 3.10.* *_cpython target_platform: -- linux-64 +- osx-64 zip_keys: - - c_compiler_version - cxx_compiler_version - - python - - channel_sources + - is_python_min diff --git a/.ci_support/linux_64_python3.12.____cpython.yaml b/.ci_support/osx_arm64_is_python_mintruepython3.10.____cpython.yaml similarity index 55% rename from .ci_support/linux_64_python3.12.____cpython.yaml rename to .ci_support/osx_arm64_is_python_mintruepython3.10.____cpython.yaml index 700b800..eaa25bb 100644 --- a/.ci_support/linux_64_python3.12.____cpython.yaml +++ b/.ci_support/osx_arm64_is_python_mintruepython3.10.____cpython.yaml @@ -1,31 +1,39 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' c_compiler: -- gcc +- clang c_compiler_version: -- '14' +- '19' c_stdlib: -- sysroot +- macosx_deployment_target c_stdlib_version: -- '2.17' +- '11.0' channel_sources: - conda-forge channel_targets: - conda-forge main cxx_compiler: -- gxx +- clangxx cxx_compiler_version: -- '14' -docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 +- '19' +is_abi3: +- true +is_python_min: +- true +macos_machine: +- arm64-apple-darwin20.0.0 pin_run_as_build: python: min_pin: x.x max_pin: x.x python: -- 3.12.* *_cpython +- 3.10.* *_cpython target_platform: -- linux-64 +- osx-arm64 zip_keys: - - c_compiler_version - cxx_compiler_version - - python - - channel_sources + - is_python_min diff --git a/.ci_support/win_64_python3.10.____cpython.yaml b/.ci_support/win_64_is_python_mintruepython3.10.____cpython.yaml similarity index 82% rename from .ci_support/win_64_python3.10.____cpython.yaml rename to .ci_support/win_64_is_python_mintruepython3.10.____cpython.yaml index ad45e50..8aaefdd 100644 --- a/.ci_support/win_64_python3.10.____cpython.yaml +++ b/.ci_support/win_64_is_python_mintruepython3.10.____cpython.yaml @@ -8,6 +8,10 @@ channel_targets: - conda-forge main cxx_compiler: - vs2022 +is_abi3: +- true +is_python_min: +- true pin_run_as_build: python: min_pin: x.x @@ -18,4 +22,4 @@ target_platform: - win-64 zip_keys: - - python - - channel_sources + - is_python_min diff --git a/.ci_support/win_64_python3.11.____cpython.yaml b/.ci_support/win_64_python3.11.____cpython.yaml deleted file mode 100644 index 8cfae04..0000000 --- a/.ci_support/win_64_python3.11.____cpython.yaml +++ /dev/null @@ -1,21 +0,0 @@ -c_compiler: -- vs2022 -c_stdlib: -- vs -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cxx_compiler: -- vs2022 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.11.* *_cpython -target_platform: -- win-64 -zip_keys: -- - python - - channel_sources diff --git a/.ci_support/win_64_python3.12.____cpython.yaml b/.ci_support/win_64_python3.12.____cpython.yaml deleted file mode 100644 index bc47ee6..0000000 --- a/.ci_support/win_64_python3.12.____cpython.yaml +++ /dev/null @@ -1,21 +0,0 @@ -c_compiler: -- vs2022 -c_stdlib: -- vs -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cxx_compiler: -- vs2022 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.12.* *_cpython -target_platform: -- win-64 -zip_keys: -- - python - - channel_sources diff --git a/.ci_support/win_64_python3.13.____cp313.yaml b/.ci_support/win_64_python3.13.____cp313.yaml deleted file mode 100644 index a112f9f..0000000 --- a/.ci_support/win_64_python3.13.____cp313.yaml +++ /dev/null @@ -1,21 +0,0 @@ -c_compiler: -- vs2022 -c_stdlib: -- vs -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cxx_compiler: -- vs2022 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.13.* *_cp313 -target_platform: -- win-64 -zip_keys: -- - python - - channel_sources diff --git a/.ci_support/win_64_python3.14.____cp314.yaml b/.ci_support/win_64_python3.14.____cp314.yaml deleted file mode 100644 index 220e836..0000000 --- a/.ci_support/win_64_python3.14.____cp314.yaml +++ /dev/null @@ -1,21 +0,0 @@ -c_compiler: -- vs2022 -c_stdlib: -- vs -channel_sources: -- conda-forge,conda-forge/label/python_rc -channel_targets: -- conda-forge main -cxx_compiler: -- vs2022 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.14.* *_cp314 -target_platform: -- win-64 -zip_keys: -- - python - - channel_sources diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2551989..04c93ec 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @fcollonval @markaren \ No newline at end of file +* @fcollonval @jschueller @markaren \ No newline at end of file diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index a948c6c..5eebe7c 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -1,15 +1,117 @@ -# This file was added automatically by admin-migrations. Do not modify. -# It ensures that Github Actions can run once rerendered for the first time. +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. # -*- mode: yaml -*- name: Build conda package on: - workflow_dispatch: + push: + + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true jobs: build: - name: Disabled build - runs-on: ubuntu-slim - if: false + name: ${{ matrix.CONFIG }} + runs-on: ${{ matrix.runs_on }} + timeout-minutes: 360 + strategy: + fail-fast: false + max-parallel: 50 + matrix: + include: + - CONFIG: linux_64_is_python_mintruepython3.10.____cpython + STORE_BUILD_ARTIFACTS: False + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['ubuntu-latest'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + - CONFIG: linux_aarch64_is_python_mintruepython3.10.____cpython + STORE_BUILD_ARTIFACTS: False + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['ubuntu-24.04-arm'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-aarch64:alma9 steps: - - run: exit 0 + + - name: Checkout code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Build on Linux + id: build-linux + if: matrix.os == 'ubuntu' + env: + CONFIG: ${{ matrix.CONFIG }} + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + DOCKER_IMAGE: ${{ matrix.DOCKER_IMAGE }} + CI: github_actions + CONDA_FORGE_DOCKER_RUN_ARGS: "${{ matrix.CONDA_FORGE_DOCKER_RUN_ARGS }}" + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} + shell: bash + run: | + if [[ "$(uname -m)" == "x86_64" ]]; then + echo "::group::Configure binfmt_misc" + docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes + fi + export flow_run_id="github_$GITHUB_RUN_ID" + export remote_url="https://github.com/$GITHUB_REPOSITORY" + export sha="$GITHUB_SHA" + export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" + export GIT_BRANCH="$(basename $GITHUB_REF)" + if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + echo "::endgroup::" + ./.scripts/run_docker_build.sh + + - name: Build on macOS + id: build-macos + if: matrix.os == 'macos' + env: + CONFIG: ${{ matrix.CONFIG }} + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + CI: github_actions + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} + shell: bash + run: | + export flow_run_id="github_$GITHUB_RUN_ID" + export remote_url="https://github.com/$GITHUB_REPOSITORY" + export sha="$GITHUB_SHA" + export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" + export GIT_BRANCH="$(basename $GITHUB_REF)" + if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + ./.scripts/run_osx_build.sh + + - name: Build on windows + id: build-windows + if: matrix.os == 'windows' + shell: cmd + run: | + set "flow_run_id=github_%GITHUB_RUN_ID%" + set "remote_url=https://github.com/%GITHUB_REPOSITORY%" + set "sha=%GITHUB_SHA%" + call ".scripts\run_win_build.bat" + env: + # default value; make it explicit, as it needs to match with artefact + # generation below. Not configurable for now, can be revisited later + CONDA_BLD_PATH: C:\bld + MINIFORGE_HOME: ${{ contains(runner.arch, 'ARM') && 'C' || 'D' }}:\Miniforge + PYTHONUNBUFFERED: 1 + CONFIG: ${{ matrix.CONFIG }} + CI: github_actions + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 47b5408..86a9c55 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ # Ignore all files and folders in root * !/conda-forge.yml +!.recipe_maintainers.json # Don't ignore any files/folders if the parent folder is 'un-ignored' # This also avoids warnings when adding an already-checked file with an ignored parent. diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 250a5e2..d7df163 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -20,6 +20,7 @@ export PYTHONUNBUFFERED=1 export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" +export RATTLER_CACHE_DIR="${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache" cat >~/.condarc </dev/null && pwd )" PROVIDER_DIR="$(basename "$THISDIR")" @@ -27,7 +29,7 @@ if [[ "${sha:-}" == "" ]]; then popd fi -docker info +${DOCKER_EXECUTABLE} info # In order for the conda-build process in the container to write to the mounted # volumes, we need to run with the same id as the host machine, which is @@ -35,6 +37,7 @@ docker info export HOST_USER_ID=$(id -u) # Check if docker-machine is being used (normally on OSX) and get the uid from # the VM + if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) fi @@ -76,16 +79,34 @@ if [ -z "${CI}" ]; then DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" fi -( endgroup "Configure Docker" ) 2> /dev/null +# Default volume suffix for Docker (preserve original behavior) +VOLUME_SUFFIX=",z" +# Podman-specific handling +if [ "${DOCKER_EXECUTABLE}" = "podman" ]; then + # Fix file permissions for rootless podman builds + podman unshare chown -R ${HOST_USER_ID}:${HOST_USER_ID} "${ARTIFACTS}" + podman unshare chown -R ${HOST_USER_ID}:${HOST_USER_ID} "${RECIPE_ROOT}" + + # Add SELinux label only if enforcing + if command -v getenforce &>/dev/null && [ "$(getenforce)" = "Enforcing" ]; then + VOLUME_SUFFIX=",z" + else + VOLUME_SUFFIX="" + fi +fi + +( endgroup "Configure Docker" ) 2> /dev/null ( startgroup "Start Docker" ) 2> /dev/null export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" export IS_PR_BUILD="${IS_PR_BUILD:-False}" -docker pull "${DOCKER_IMAGE}" -docker run ${DOCKER_RUN_ARGS} \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ + +${DOCKER_EXECUTABLE} pull "${DOCKER_IMAGE}" + +${DOCKER_EXECUTABLE} run ${DOCKER_RUN_ARGS} \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw${VOLUME_SUFFIX},delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw${VOLUME_SUFFIX},delegated \ -e CONFIG \ -e HOST_USER_ID \ -e UPLOAD_PACKAGES \ diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh new file mode 100755 index 0000000..df767d0 --- /dev/null +++ b/.scripts/run_osx_build.sh @@ -0,0 +1,135 @@ +#!/usr/bin/env bash + +# -*- mode: jinja-shell -*- + +source .scripts/logging_utils.sh + +set -xe + +MINIFORGE_HOME="${MINIFORGE_HOME:-${HOME}/miniforge3}" +MINIFORGE_HOME="${MINIFORGE_HOME%/}" # remove trailing slash +export CONDA_BLD_PATH="${CONDA_BLD_PATH:-${MINIFORGE_HOME}/conda-bld}" + +( startgroup "Provisioning base env with micromamba" ) 2> /dev/null +MICROMAMBA_VERSION="1.5.10-0" +if [[ "$(uname -m)" == "arm64" ]]; then + osx_arch="osx-arm64" +else + osx_arch="osx-64" +fi +MICROMAMBA_URL="https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-${osx_arch}" +MAMBA_ROOT_PREFIX="${MINIFORGE_HOME}-micromamba-$(date +%s)" +echo "Downloading micromamba ${MICROMAMBA_VERSION}" +micromamba_exe="$(mktemp -d)/micromamba" +curl -L -o "${micromamba_exe}" "${MICROMAMBA_URL}" +chmod +x "${micromamba_exe}" +echo "Creating environment" +"${micromamba_exe}" create --yes --root-prefix "${MAMBA_ROOT_PREFIX}" --prefix "${MINIFORGE_HOME}" \ + --channel conda-forge \ + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" +echo "Moving pkgs cache from ${MAMBA_ROOT_PREFIX} to ${MINIFORGE_HOME}" +mv "${MAMBA_ROOT_PREFIX}/pkgs" "${MINIFORGE_HOME}" +echo "Cleaning up micromamba" +rm -rf "${MAMBA_ROOT_PREFIX}" "${micromamba_exe}" || true +( endgroup "Provisioning base env with micromamba" ) 2> /dev/null + +( startgroup "Configuring conda" ) 2> /dev/null +echo "Activating environment" +source "${MINIFORGE_HOME}/etc/profile.d/conda.sh" +conda activate base +export CONDA_SOLVER="libmamba" +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 + + + + + +echo -e "\n\nSetting up the condarc and mangling the compiler." +setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml + +if [[ "${CI:-}" != "" ]]; then + mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml +fi + +if [[ "${CI:-}" != "" ]]; then + echo -e "\n\nMangling homebrew in the CI to avoid conflicts." + /usr/bin/sudo mangle_homebrew + /usr/bin/sudo -k +else + echo -e "\n\nNot mangling homebrew as we are not running in CI" +fi + +if [[ "${sha:-}" == "" ]]; then + sha=$(git rev-parse HEAD) +fi + +if [[ "${OSX_SDK_DIR:-}" == "" ]]; then + if [[ "${CI:-}" == "" ]]; then + echo "Please set OSX_SDK_DIR to a directory where SDKs can be downloaded to. Aborting" + exit 1 + else + export OSX_SDK_DIR=/opt/conda-sdks + /usr/bin/sudo mkdir -p "${OSX_SDK_DIR}" + /usr/bin/sudo chown "${USER}" "${OSX_SDK_DIR}" + fi +else + if tmpf=$(mktemp -p "$OSX_SDK_DIR" tmp.XXXXXXXX 2>/dev/null); then + rm -f "$tmpf" + echo "OSX_SDK_DIR is writeable without sudo, continuing" + else + echo "User-provided OSX_SDK_DIR is not writeable for current user! Aborting" + exit 1 + fi +fi + +echo -e "\n\nRunning the build setup script." +source run_conda_forge_build_setup + + + +( endgroup "Configuring conda" ) 2> /dev/null + +echo -e "\n\nMaking the build clobber file" +make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml + +if [[ -f LICENSE.txt ]]; then + cp LICENSE.txt "recipe/recipe-scripts-license.txt" +fi + +if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then + if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" + fi + conda debug ./recipe -m ./.ci_support/${CONFIG}.yaml \ + ${EXTRA_CB_OPTIONS:-} \ + --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + + # Drop into an interactive shell + /bin/bash +else + + conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ + --suppress-variables ${EXTRA_CB_OPTIONS:-} \ + --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ + --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" + + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir ./recipe -m ./.ci_support/${CONFIG}.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null + ( startgroup "Validating outputs" ) 2> /dev/null + + validate_recipe_outputs "${FEEDSTOCK_NAME}" + + ( endgroup "Validating outputs" ) 2> /dev/null + + ( startgroup "Uploading packages" ) 2> /dev/null + + if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then + upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml + fi + + ( endgroup "Uploading packages" ) 2> /dev/null +fi diff --git a/LICENSE.txt b/LICENSE.txt index 2ec51d7..c5aa738 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,5 @@ BSD-3-Clause license -Copyright (c) 2015-2022, conda-forge contributors -All rights reserved. +Copyright (c) 2015-2026, conda-forge contributors Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index ec66756..469c436 100644 --- a/README.md +++ b/README.md @@ -29,73 +29,38 @@ Current build status - + - + - + - + - + - - - - - - - - - - - - - - - @@ -228,5 +193,6 @@ Feedstock Maintainers ===================== * [@fcollonval](https://github.com/fcollonval/) +* [@jschueller](https://github.com/jschueller/) * [@markaren](https://github.com/markaren/) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 773d216..03594e4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ stages: jobs: - job: Skip pool: - vmImage: 'ubuntu-22.04' + vmImage: 'ubuntu-latest' variables: DECODE_PERCENTS: 'false' RET: 'true' @@ -28,5 +28,5 @@ stages: condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) dependsOn: Check jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml + - template: ./.azure-pipelines/azure-pipelines-osx.yml - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file diff --git a/build-locally.py b/build-locally.py index 9dfe440..05493e4 100755 --- a/build-locally.py +++ b/build-locally.py @@ -1,5 +1,6 @@ #!/bin/sh """exec" "python3" "$0" "$@" #""" # fmt: off # fmt: on + # # This file has been generated by conda-smithy in order to build the recipe # locally. @@ -27,13 +28,6 @@ def setup_environment(ns): os.path.dirname(__file__), "miniforge3" ) - # The default cache location might not be writable using docker on macOS. - if ns.config.startswith("linux") and platform.system() == "Darwin": - os.environ["CONDA_FORGE_DOCKER_RUN_ARGS"] = ( - os.environ.get("CONDA_FORGE_DOCKER_RUN_ARGS", "") - + " -e RATTLER_CACHE_DIR=/tmp/rattler_cache" - ) - def run_docker_build(ns): script = ".scripts/run_docker_build.sh" diff --git a/conda-forge.yml b/conda-forge.yml index 2f501ce..b78bfe4 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -4,3 +4,6 @@ github: tooling_branch_name: main conda_build: pkg_format: '2' +provider: + linux_aarch64: default + osx_arm64: default diff --git a/recipe/build.sh b/recipe/build.sh index 44d744d..546e19a 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,4 +1,4 @@ -cmake -S pythonfmu/pythonfmu-export -B tmp-build -DPython3_EXECUTABLE:FILEPATH=$PYTHON -DCMAKE_BUILD_TYPE=Release +cmake ${CMAKE_ARGS} -LAH -DCMAKE_BUILD_TYPE=Release -B tmp-build . cmake --build tmp-build --parallel ${CPU_COUNT} $PYTHON -m pip install . -vv diff --git a/recipe/clang.patch b/recipe/clang.patch new file mode 100644 index 0000000..16d5009 --- /dev/null +++ b/recipe/clang.patch @@ -0,0 +1,13 @@ +diff --git a/src/pythonfmu/PySlaveInstance.cpp b/src/pythonfmu/PySlaveInstance.cpp +index f05c866..4b5262a 100644 +--- a/src/pythonfmu/PySlaveInstance.cpp ++++ b/src/pythonfmu/PySlaveInstance.cpp +@@ -718,7 +718,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, + } + return TRUE; + } +-#elif defined(__linux__) ++#elif defined(__GNUC__) || defined(__clang__) + __attribute__((destructor)) void onLibraryUnload() + { + finalizePythonInterpreter(); diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 809f9b4..e4ae9fb 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,17 +1,19 @@ -{% set name = "pythonfmu" %} -{% set version = "0.6.9" %} +{% set version = "0.7.0" %} package: - name: {{ name|lower }} + name: pythonfmu version: {{ version }} source: - url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz - sha256: 13eab981d3c86704ab19b35ebcee9347b2dcc378bbe8d0b43c9ae1fe35bc9fa7 + url: https://github.com/NTNU-IHB/PythonFMU/archive/refs/tags/v{{ version }}.tar.gz + sha256: caafdfcbd08e57e5d913b94e5be87f9727f82825bebf6cec495f6efedba97ebf + patches: + - clang.patch build: - number: 1 - skip: true # [osx] + number: 0 + python_version_independent: true # [is_abi3] + skip: true # [is_abi3 and not is_python_min] entry_points: - pythonfmu = pythonfmu.__main__:cli_main @@ -24,6 +26,7 @@ requirements: - make # [unix] host: - python + - python-abi3 # [is_abi3] - pip - setuptools run: @@ -50,3 +53,4 @@ extra: recipe-maintainers: - fcollonval - markaren + - jschueller
VariantStatus
linux_64_python3.10.____cpythonlinux_64_is_python_mintruepython3.10.____cpython - variant + variant
linux_64_python3.11.____cpythonlinux_aarch64_is_python_mintruepython3.10.____cpython - variant + variant
linux_64_python3.12.____cpythonosx_64_is_python_mintruepython3.10.____cpython - variant + variant
linux_64_python3.13.____cp313osx_arm64_is_python_mintruepython3.10.____cpython - variant + variant
linux_64_python3.14.____cp314win_64_is_python_mintruepython3.10.____cpython - variant - -
win_64_python3.10.____cpython - - variant - -
win_64_python3.11.____cpython - - variant - -
win_64_python3.12.____cpython - - variant - -
win_64_python3.13.____cp313 - - variant - -
win_64_python3.14.____cp314 - - variant + variant