From 7a56f539a79e6ec1311ca640fdfdb734a342791c Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Mon, 18 Nov 2024 02:08:07 -0700 Subject: [PATCH] MNT: Remove 'pip install' options (#10) * Remove --no-deps --no-build-isolation 'pip install' options in recipes as the build tool (e.g. conda-build, rattler-build) will enforce all required 'pip install' options itself at build time. * Bump build number. * MNT: Re-rendered with conda-build 24.9.0, conda-smithy 3.44.6, and conda-forge-pinning 2024.11.17.06.32.00 --------- Co-authored-by: conda-forge-webservices[bot] <91080706+conda-forge-webservices[bot]@users.noreply.github.com> --- .azure-pipelines/azure-pipelines-osx.yml | 0 .azure-pipelines/azure-pipelines-win.yml | 19 +------- .../linux_64_python3.10.____cpython.yaml | 5 +-- .../linux_64_python3.11.____cpython.yaml | 5 +-- .../linux_64_python3.12.____cpython.yaml | 5 +-- .../linux_64_python3.13.____cp313.yaml | 5 +-- .../linux_64_python3.9.____cpython.yaml | 5 +-- .../linux_aarch64_python3.10.____cpython.yaml | 5 +-- .../linux_aarch64_python3.11.____cpython.yaml | 5 +-- .../linux_aarch64_python3.12.____cpython.yaml | 5 +-- .../linux_aarch64_python3.13.____cp313.yaml | 5 +-- .../linux_aarch64_python3.9.____cpython.yaml | 5 +-- .../linux_ppc64le_python3.10.____cpython.yaml | 5 +-- .../linux_ppc64le_python3.11.____cpython.yaml | 5 +-- .../linux_ppc64le_python3.12.____cpython.yaml | 5 +-- .../linux_ppc64le_python3.13.____cp313.yaml | 5 +-- .../linux_ppc64le_python3.9.____cpython.yaml | 5 +-- .../osx_64_python3.10.____cpython.yaml | 2 +- .../osx_64_python3.11.____cpython.yaml | 2 +- .../osx_64_python3.12.____cpython.yaml | 2 +- .ci_support/osx_64_python3.13.____cp313.yaml | 2 +- .ci_support/osx_64_python3.9.____cpython.yaml | 2 +- .../osx_arm64_python3.10.____cpython.yaml | 2 +- .../osx_arm64_python3.11.____cpython.yaml | 2 +- .../osx_arm64_python3.12.____cpython.yaml | 2 +- .../osx_arm64_python3.13.____cp313.yaml | 2 +- .../osx_arm64_python3.9.____cpython.yaml | 2 +- .scripts/build_steps.sh | 14 +++--- .scripts/run_osx_build.sh | 45 ++++++++++++------- .scripts/run_win_build.bat | 40 ++++++++++++----- azure-pipelines.yml | 2 +- recipe/meta.yaml | 6 +-- 32 files changed, 96 insertions(+), 125 deletions(-) mode change 100644 => 100755 .azure-pipelines/azure-pipelines-osx.yml diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml old mode 100644 new mode 100755 diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index dfeab3b..13ee5d5 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -26,31 +26,16 @@ jobs: timeoutInMinutes: 360 variables: CONDA_BLD_PATH: D:\\bld\\ + MINIFORGE_HOME: D:\Miniforge UPLOAD_TEMP: D:\\tmp steps: - - task: PythonScript@0 - displayName: 'Download Miniforge' - inputs: - scriptSource: inline - script: | - import urllib.request - url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe' - path = r"$(Build.ArtifactStagingDirectory)/Miniforge.exe" - urllib.request.urlretrieve(url, path) - - - script: | - start /wait "" %BUILD_ARTIFACTSTAGINGDIRECTORY%\Miniforge.exe /InstallationType=JustMe /RegisterPython=0 /S /D=C:\Miniforge - displayName: Install Miniforge - - - powershell: Write-Host "##vso[task.prependpath]C:\Miniforge\Scripts" - displayName: Add conda to PATH - - script: | call ".scripts\run_win_build.bat" displayName: Run Windows build env: + MINIFORGE_HOME: $(MINIFORGE_HOME) PYTHONUNBUFFERED: 1 CONFIG: $(CONFIG) CI: azure diff --git a/.ci_support/linux_64_python3.10.____cpython.yaml b/.ci_support/linux_64_python3.10.____cpython.yaml index 3d9233a..9b68e7d 100644 --- a/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/.ci_support/linux_64_python3.10.____cpython.yaml @@ -3,7 +3,7 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -22,6 +22,3 @@ python: - 3.10.* *_cpython target_platform: - linux-64 -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_64_python3.11.____cpython.yaml b/.ci_support/linux_64_python3.11.____cpython.yaml index 6265430..c00fba9 100644 --- a/.ci_support/linux_64_python3.11.____cpython.yaml +++ b/.ci_support/linux_64_python3.11.____cpython.yaml @@ -3,7 +3,7 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -22,6 +22,3 @@ python: - 3.11.* *_cpython target_platform: - linux-64 -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_64_python3.12.____cpython.yaml b/.ci_support/linux_64_python3.12.____cpython.yaml index 62e4860..40b4145 100644 --- a/.ci_support/linux_64_python3.12.____cpython.yaml +++ b/.ci_support/linux_64_python3.12.____cpython.yaml @@ -3,7 +3,7 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -22,6 +22,3 @@ python: - 3.12.* *_cpython target_platform: - linux-64 -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_64_python3.13.____cp313.yaml b/.ci_support/linux_64_python3.13.____cp313.yaml index 0c521a6..27d3a53 100644 --- a/.ci_support/linux_64_python3.13.____cp313.yaml +++ b/.ci_support/linux_64_python3.13.____cp313.yaml @@ -3,7 +3,7 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -22,6 +22,3 @@ python: - 3.13.* *_cp313 target_platform: - linux-64 -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_64_python3.9.____cpython.yaml b/.ci_support/linux_64_python3.9.____cpython.yaml index 5af3a83..4ea4972 100644 --- a/.ci_support/linux_64_python3.9.____cpython.yaml +++ b/.ci_support/linux_64_python3.9.____cpython.yaml @@ -3,7 +3,7 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -22,6 +22,3 @@ python: - 3.9.* *_cpython target_platform: - linux-64 -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_aarch64_python3.10.____cpython.yaml b/.ci_support/linux_aarch64_python3.10.____cpython.yaml index 96fdd88..fd87953 100644 --- a/.ci_support/linux_aarch64_python3.10.____cpython.yaml +++ b/.ci_support/linux_aarch64_python3.10.____cpython.yaml @@ -7,7 +7,7 @@ c_stdlib_version: cdt_arch: - aarch64 cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -26,6 +26,3 @@ python: - 3.10.* *_cpython target_platform: - linux-aarch64 -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_aarch64_python3.11.____cpython.yaml b/.ci_support/linux_aarch64_python3.11.____cpython.yaml index 78eafa5..d3bd11f 100644 --- a/.ci_support/linux_aarch64_python3.11.____cpython.yaml +++ b/.ci_support/linux_aarch64_python3.11.____cpython.yaml @@ -7,7 +7,7 @@ c_stdlib_version: cdt_arch: - aarch64 cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -26,6 +26,3 @@ python: - 3.11.* *_cpython target_platform: - linux-aarch64 -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_aarch64_python3.12.____cpython.yaml b/.ci_support/linux_aarch64_python3.12.____cpython.yaml index d0a9dfe..4231a40 100644 --- a/.ci_support/linux_aarch64_python3.12.____cpython.yaml +++ b/.ci_support/linux_aarch64_python3.12.____cpython.yaml @@ -7,7 +7,7 @@ c_stdlib_version: cdt_arch: - aarch64 cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -26,6 +26,3 @@ python: - 3.12.* *_cpython target_platform: - linux-aarch64 -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_aarch64_python3.13.____cp313.yaml b/.ci_support/linux_aarch64_python3.13.____cp313.yaml index 7579c5e..c5960d9 100644 --- a/.ci_support/linux_aarch64_python3.13.____cp313.yaml +++ b/.ci_support/linux_aarch64_python3.13.____cp313.yaml @@ -7,7 +7,7 @@ c_stdlib_version: cdt_arch: - aarch64 cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -26,6 +26,3 @@ python: - 3.13.* *_cp313 target_platform: - linux-aarch64 -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_aarch64_python3.9.____cpython.yaml b/.ci_support/linux_aarch64_python3.9.____cpython.yaml index b2f326f..38421ca 100644 --- a/.ci_support/linux_aarch64_python3.9.____cpython.yaml +++ b/.ci_support/linux_aarch64_python3.9.____cpython.yaml @@ -7,7 +7,7 @@ c_stdlib_version: cdt_arch: - aarch64 cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -26,6 +26,3 @@ python: - 3.9.* *_cpython target_platform: - linux-aarch64 -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_ppc64le_python3.10.____cpython.yaml b/.ci_support/linux_ppc64le_python3.10.____cpython.yaml index 14d2cc2..4a76228 100644 --- a/.ci_support/linux_ppc64le_python3.10.____cpython.yaml +++ b/.ci_support/linux_ppc64le_python3.10.____cpython.yaml @@ -3,7 +3,7 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -22,6 +22,3 @@ python: - 3.10.* *_cpython target_platform: - linux-ppc64le -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_ppc64le_python3.11.____cpython.yaml b/.ci_support/linux_ppc64le_python3.11.____cpython.yaml index b8f310c..c00797b 100644 --- a/.ci_support/linux_ppc64le_python3.11.____cpython.yaml +++ b/.ci_support/linux_ppc64le_python3.11.____cpython.yaml @@ -3,7 +3,7 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -22,6 +22,3 @@ python: - 3.11.* *_cpython target_platform: - linux-ppc64le -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_ppc64le_python3.12.____cpython.yaml b/.ci_support/linux_ppc64le_python3.12.____cpython.yaml index 70aea9f..9a543c8 100644 --- a/.ci_support/linux_ppc64le_python3.12.____cpython.yaml +++ b/.ci_support/linux_ppc64le_python3.12.____cpython.yaml @@ -3,7 +3,7 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -22,6 +22,3 @@ python: - 3.12.* *_cpython target_platform: - linux-ppc64le -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_ppc64le_python3.13.____cp313.yaml b/.ci_support/linux_ppc64le_python3.13.____cp313.yaml index 610f092..c33a186 100644 --- a/.ci_support/linux_ppc64le_python3.13.____cp313.yaml +++ b/.ci_support/linux_ppc64le_python3.13.____cp313.yaml @@ -3,7 +3,7 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -22,6 +22,3 @@ python: - 3.13.* *_cp313 target_platform: - linux-ppc64le -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_ppc64le_python3.9.____cpython.yaml b/.ci_support/linux_ppc64le_python3.9.____cpython.yaml index 29a95da..18cdcaf 100644 --- a/.ci_support/linux_ppc64le_python3.9.____cpython.yaml +++ b/.ci_support/linux_ppc64le_python3.9.____cpython.yaml @@ -3,7 +3,7 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: - conda-forge channel_targets: @@ -22,6 +22,3 @@ python: - 3.9.* *_cpython target_platform: - linux-ppc64le -zip_keys: -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/osx_64_python3.10.____cpython.yaml b/.ci_support/osx_64_python3.10.____cpython.yaml index be7677c..cfe2efd 100644 --- a/.ci_support/osx_64_python3.10.____cpython.yaml +++ b/.ci_support/osx_64_python3.10.____cpython.yaml @@ -13,7 +13,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '17' +- '18' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: diff --git a/.ci_support/osx_64_python3.11.____cpython.yaml b/.ci_support/osx_64_python3.11.____cpython.yaml index fb3b0ac..023c32f 100644 --- a/.ci_support/osx_64_python3.11.____cpython.yaml +++ b/.ci_support/osx_64_python3.11.____cpython.yaml @@ -13,7 +13,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '17' +- '18' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: diff --git a/.ci_support/osx_64_python3.12.____cpython.yaml b/.ci_support/osx_64_python3.12.____cpython.yaml index f014d3e..5691735 100644 --- a/.ci_support/osx_64_python3.12.____cpython.yaml +++ b/.ci_support/osx_64_python3.12.____cpython.yaml @@ -13,7 +13,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '17' +- '18' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: diff --git a/.ci_support/osx_64_python3.13.____cp313.yaml b/.ci_support/osx_64_python3.13.____cp313.yaml index 193b06f..fcb36dc 100644 --- a/.ci_support/osx_64_python3.13.____cp313.yaml +++ b/.ci_support/osx_64_python3.13.____cp313.yaml @@ -13,7 +13,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '17' +- '18' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: diff --git a/.ci_support/osx_64_python3.9.____cpython.yaml b/.ci_support/osx_64_python3.9.____cpython.yaml index 7302009..697a256 100644 --- a/.ci_support/osx_64_python3.9.____cpython.yaml +++ b/.ci_support/osx_64_python3.9.____cpython.yaml @@ -13,7 +13,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '17' +- '18' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: diff --git a/.ci_support/osx_arm64_python3.10.____cpython.yaml b/.ci_support/osx_arm64_python3.10.____cpython.yaml index 14b07bd..90f958d 100644 --- a/.ci_support/osx_arm64_python3.10.____cpython.yaml +++ b/.ci_support/osx_arm64_python3.10.____cpython.yaml @@ -13,7 +13,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '17' +- '18' macos_machine: - arm64-apple-darwin20.0.0 pin_run_as_build: diff --git a/.ci_support/osx_arm64_python3.11.____cpython.yaml b/.ci_support/osx_arm64_python3.11.____cpython.yaml index 102ae36..5dedf0c 100644 --- a/.ci_support/osx_arm64_python3.11.____cpython.yaml +++ b/.ci_support/osx_arm64_python3.11.____cpython.yaml @@ -13,7 +13,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '17' +- '18' macos_machine: - arm64-apple-darwin20.0.0 pin_run_as_build: diff --git a/.ci_support/osx_arm64_python3.12.____cpython.yaml b/.ci_support/osx_arm64_python3.12.____cpython.yaml index df54d3b..498fe60 100644 --- a/.ci_support/osx_arm64_python3.12.____cpython.yaml +++ b/.ci_support/osx_arm64_python3.12.____cpython.yaml @@ -13,7 +13,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '17' +- '18' macos_machine: - arm64-apple-darwin20.0.0 pin_run_as_build: diff --git a/.ci_support/osx_arm64_python3.13.____cp313.yaml b/.ci_support/osx_arm64_python3.13.____cp313.yaml index 229ba8d..de77a34 100644 --- a/.ci_support/osx_arm64_python3.13.____cp313.yaml +++ b/.ci_support/osx_arm64_python3.13.____cp313.yaml @@ -13,7 +13,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '17' +- '18' macos_machine: - arm64-apple-darwin20.0.0 pin_run_as_build: diff --git a/.ci_support/osx_arm64_python3.9.____cpython.yaml b/.ci_support/osx_arm64_python3.9.____cpython.yaml index 60e0fb2..ecb734e 100644 --- a/.ci_support/osx_arm64_python3.9.____cpython.yaml +++ b/.ci_support/osx_arm64_python3.9.____cpython.yaml @@ -13,7 +13,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '17' +- '18' macos_machine: - arm64-apple-darwin20.0.0 pin_run_as_build: diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 856f469..827a29f 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -31,13 +31,13 @@ pkgs_dirs: solver: libmamba CONDARC +mv /opt/conda/conda-meta/history /opt/conda/conda-meta/history.$(date +%Y-%m-%d-%H-%M-%S) +echo > /opt/conda/conda-meta/history +micromamba install --root-prefix ~/.conda --prefix /opt/conda \ + --yes --override-channels --channel conda-forge --strict-channel-priority \ + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 -mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" - # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -76,8 +76,8 @@ else --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.6.0 - command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + # 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_ROOT}" -m "${CONFIG_FILE}" || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 420f051..0b36498 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -7,28 +7,39 @@ source .scripts/logging_utils.sh set -xe MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} +MINIFORGE_HOME=${MINIFORGE_HOME%/} # remove trailing slash -( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null - -MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" -MINIFORGE_FILE="Miniforge3-MacOSX-$(uname -m).sh" -curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" -rm -rf ${MINIFORGE_HOME} -bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} - -( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null +( 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 - -source ${MINIFORGE_HOME}/etc/profile.d/conda.sh +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 -mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" + @@ -88,8 +99,8 @@ else ( startgroup "Inspecting artifacts" ) 2> /dev/null - # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 - command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + # 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 diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index a45c34f..3aaf80c 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -3,30 +3,50 @@ :: changes to this script, consider a proposal to conda-smithy so that other feedstocks can also :: benefit from the improvement. -:: Note: we assume a Miniforge installation is available - :: INPUTS (required environment variables) :: CONFIG: name of the .ci_support/*.yaml file for this job :: CI: azure, github_actions, or unset +:: MINIFORGE_HOME: where to install the base conda environment :: UPLOAD_PACKAGES: true or false :: UPLOAD_ON_BRANCH: true or false setlocal enableextensions enabledelayedexpansion +FOR %%A IN ("%~dp0.") DO SET "REPO_ROOT=%%~dpA" +if "%MINIFORGE_HOME%"=="" set "MINIFORGE_HOME=%USERPROFILE%\Miniforge3" +:: Remove trailing backslash, if present +if "%MINIFORGE_HOME:~-1%"=="\" set "MINIFORGE_HOME=%MINIFORGE_HOME:~0,-1%" +call :start_group "Provisioning base env with micromamba" +set "MAMBA_ROOT_PREFIX=%MINIFORGE_HOME%-micromamba-%RANDOM%" +set "MICROMAMBA_VERSION=1.5.10-0" +set "MICROMAMBA_URL=https://github.com/mamba-org/micromamba-releases/releases/download/%MICROMAMBA_VERSION%/micromamba-win-64" +set "MICROMAMBA_TMPDIR=%TMP%\micromamba-%RANDOM%" +set "MICROMAMBA_EXE=%MICROMAMBA_TMPDIR%\micromamba.exe" + +echo Downloading micromamba %MICROMAMBA_VERSION% +if not exist "%MICROMAMBA_TMPDIR%" mkdir "%MICROMAMBA_TMPDIR%" +certutil -urlcache -split -f "%MICROMAMBA_URL%" "%MICROMAMBA_EXE%" +if !errorlevel! neq 0 exit /b !errorlevel! + +echo Creating environment +call "%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" +if !errorlevel! neq 0 exit /b !errorlevel! +echo Removing %MAMBA_ROOT_PREFIX% +del /S /Q "%MAMBA_ROOT_PREFIX%" >nul +del /S /Q "%MICROMAMBA_TMPDIR%" >nul + call :start_group "Configuring conda" :: Activate the base conda environment -call activate base +echo Activating environment +call "%MINIFORGE_HOME%\Scripts\activate.bat" :: Configure the solver set "CONDA_SOLVER=libmamba" if !errorlevel! neq 0 exit /b !errorlevel! set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" -:: Provision the necessary dependencies to build the recipe later -echo Installing dependencies -mamba.exe install pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -c conda-forge --strict-channel-priority --yes -if !errorlevel! neq 0 exit /b !errorlevel! - :: Set basic configuration echo Setting up configuration setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml @@ -59,8 +79,8 @@ conda-build.exe "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTR if !errorlevel! neq 0 exit /b !errorlevel! call :start_group "Inspecting artifacts" -:: inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 -WHERE inspect_artifacts >nul 2>nul && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" +:: inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 +WHERE inspect_artifacts >nul 2>nul && inspect_artifacts --recipe-dir ".\recipe" -m .ci_support\%CONFIG%.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" call :end_group :: Prepare some environment variables for the upload step diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 32da3d0..eff4ad6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,7 +19,7 @@ stages: echo "##vso[task.setvariable variable=log]$git_log" displayName: Obtain commit message - bash: echo "##vso[task.setvariable variable=RET]false" - condition: or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]')) + condition: and(eq(variables['Build.Reason'], 'PullRequest'), or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]'))) displayName: Skip build? - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET" name: result diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 969383c..d686fea 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -6,13 +6,13 @@ package: version: {{ version }} source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/pyhepmc-{{ version }}.tar.gz + url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/pyhepmc-{{ version }}.tar.gz sha256: 17a6f941e4fa06d08a628990f6816d1da5e545d65f533e6f598740d2cb76ace4 build: skip: true # [py<39] - script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation - number: 2 + script: {{ PYTHON }} -m pip install . -vv + number: 3 requirements: build: