From b0405a8b8e16e4603141a32d028eac2529c64557 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 19 Mar 2021 11:27:40 +0100 Subject: [PATCH 1/3] Use pin_subpackage in run_exports --- recipe/meta.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 06bc56d..8c5f202 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -15,7 +15,7 @@ source: - modify-dotpc-win.patch # [win] build: - number: 3 + number: 4 skip: true # [win and py==27] # add libode to the whitelist; it can apparently not be found yet when # pyode is built @@ -51,7 +51,8 @@ outputs: - libcxx # [osx] - vs2015_runtime # [win] run_exports: - - libode + # No ABI docs or ABI Laboratory history, better be conservative + - {{ pin_subpackage(name, max_pin='x.x.x') }} files: - lib/libode* # [unix] - lib/pkgconfig/ode.pc # [unix] From ee25485de510a8b2ffc5c1552d9b4aa3fdef9c3f Mon Sep 17 00:00:00 2001 From: conda-forge-linter Date: Fri, 19 Mar 2021 10:30:48 +0000 Subject: [PATCH 2/3] MNT: Re-rendered with conda-build 3.21.4, conda-smithy 3.9.0, and conda-forge-pinning 2021.03.19.08.01.08 --- .ci_support/linux_64_.yaml | 2 ++ .scripts/build_steps.sh | 22 +++++++++++++++++++--- .scripts/logging_utils.sh | 30 ++++++++++++++++++++++++++++++ .scripts/run_docker_build.sh | 6 ++++++ .scripts/run_osx_build.sh | 34 ++++++++++++++++------------------ LICENSE.txt | 2 +- README.md | 4 ++-- 7 files changed, 76 insertions(+), 24 deletions(-) create mode 100644 .scripts/logging_utils.sh diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 3b357b4..0f6e58e 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -19,3 +19,5 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version +- - cdt_name + - docker_image diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index aa9727b..522eabc 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -6,8 +6,14 @@ # benefit from the improvement. set -xeuo pipefail -export PYTHONUNBUFFERED=1 export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" +source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh + + +endgroup "Start Docker" + +startgroup "Configuring conda" +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" @@ -18,8 +24,9 @@ conda-build: root-dir: ${FEEDSTOCK_ROOT}/build_artifacts CONDARC +BUILD_CMD=build -conda install --yes --quiet "conda-forge-ci-setup=3" conda-build pip -c conda-forge +conda install --yes --quiet "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} -c conda-forge # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -29,24 +36,33 @@ source run_conda_forge_build_setup # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" +endgroup "Configuring conda" if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then + startgroup "Running conda debug" if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" fi conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + endgroup "Running conda debug" # Drop into an interactive shell /bin/bash else - conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + startgroup "Running conda $BUILD_CMD" + conda $BUILD_CMD "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + endgroup "Running conda build" + startgroup "Validating outputs" validate_recipe_outputs "${FEEDSTOCK_NAME}" + endgroup "Validating outputs" if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then + startgroup "Uploading packages" upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + endgroup "Uploading packages" fi fi diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh new file mode 100644 index 0000000..a53ef3f --- /dev/null +++ b/.scripts/logging_utils.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Provide a unified interface for the different logging +# utilities CI providers offer. If unavailable, provide +# a compatible fallback (e.g. bare `echo xxxxxx`). + +function startgroup { + # Start a foldable group of log lines + # Pass a single argument, quoted + case ${CI:-} in + azure ) + echo "##[group]$1";; + travis ) + echo "$1" + echo -en 'travis_fold:start:'"${1// /}"'\\r';; + * ) + echo "$1";; + esac +} + +function endgroup { + # End a foldable group of log lines + # Pass a single argument, quoted + case ${CI:-} in + azure ) + echo "##[endgroup]";; + travis ) + echo -en 'travis_fold:end:'"${1// /}"'\\r';; + esac +} diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 36dacd6..16d6c15 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -5,6 +5,10 @@ # changes to this script, consider a proposal to conda-smithy so that other feedstocks can also # benefit from the improvement. +source .scripts/logging_utils.sh + +startgroup "Configure Docker" + set -xeo pipefail THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" @@ -65,7 +69,9 @@ DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" if [ -z "${CI}" ]; then DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" fi +endgroup "Configure Docker" +startgroup "Start Docker" export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" docker run ${DOCKER_RUN_ARGS} \ -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index c299b79..614ca84 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -1,29 +1,24 @@ #!/usr/bin/env bash +source .scripts/logging_utils.sh + set -x -echo -e "\n\nInstalling a fresh version of Miniforge." -if [[ ${CI} == "travis" ]]; then - echo -en 'travis_fold:start:install_miniforge\\r' -fi +startgroup "Installing a fresh version of Miniforge" MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" MINIFORGE_FILE="Miniforge3-MacOSX-x86_64.sh" curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" bash $MINIFORGE_FILE -b -if [[ ${CI} == "travis" ]]; then - echo -en 'travis_fold:end:install_miniforge\\r' -fi +endgroup "Installing a fresh version of Miniforge" -echo -e "\n\nConfiguring conda." -if [[ ${CI} == "travis" ]]; then - echo -en 'travis_fold:start:configure_conda\\r' -fi +startgroup "Configuring conda" +BUILD_CMD=build source ${HOME}/miniforge3/etc/profile.d/conda.sh conda activate base echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build." -conda install -n base --quiet --yes "conda-forge-ci-setup=3" conda-build pip +conda install -n base --quiet --yes "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} @@ -39,19 +34,22 @@ echo -e "\n\nRunning the build setup script." source run_conda_forge_build_setup -if [[ ${CI} == "travis" ]]; then - echo -en 'travis_fold:end:configure_conda\\r' -fi +endgroup "Configuring conda" set -e -echo -e "\n\nMaking the build clobber file and running the build." +startgroup "Running conda $BUILD_CMD" +echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml -conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} +conda $BUILD_CMD ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} +endgroup "Running conda build" +startgroup "Validating outputs" validate_recipe_outputs "${FEEDSTOCK_NAME}" +endgroup "Validating outputs" if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then - echo -e "\n\nUploading the packages." + startgroup "Uploading packages" upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml + endgroup "Uploading packages" fi \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index 5f30279..ed3f451 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ BSD 3-clause license -Copyright (c) 2015-2020, conda-forge contributors +Copyright (c) 2015-2021, conda-forge contributors All rights reserved. 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 33e2d4d..2479619 100644 --- a/README.md +++ b/README.md @@ -168,9 +168,9 @@ build distinct package versions. In order to produce a uniquely identifiable distribution: * If the version of a package **is not** being increased, please add or increase - the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string). + the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string). * If the version of a package **is** being increased, please remember to return - the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string) + the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string) back to 0. Feedstock Maintainers From 8ac802f961e070a6d26b68c9c11d8a53072ea175 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 19 Mar 2021 19:02:15 +0100 Subject: [PATCH 3/3] Update meta.yaml --- recipe/meta.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8c5f202..7cf2e29 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -61,7 +61,7 @@ outputs: - Library/lib/ode_double.lib # [win] - Library/bin/ode_double.dll # [win] - Library/lib/pkgconfig/ode.pc # [win] - - Library/lib/cmake/ode* # [win] + - Library/lib/cmake/ode-{{ soversion }} # [win] - include/ode test: commands: @@ -70,9 +70,12 @@ outputs: - test -f $PREFIX/lib/libode.{{ soversion }}${SHLIB_EXT} # [osx] - test -d $PREFIX/include/ode # [unix] - test -f $PREFIX/lib/pkgconfig/ode.pc # [unix] + - test -f $PREFIX/lib/cmake/ode-{{ soversion }}/ode-config.cmake # [unix] - if not exist %PREFIX%\Library\lib\ode_double.lib exit 1 # [win] - if not exist %PREFIX%\Library\bin\ode_double.dll exit 1 # [win] - if not exist %PREFIX%\Library\lib\pkgconfig\ode.pc exit 1 # [win] + - if not exist %PREFIX%\\Library\\lib\\cmake\\ode-{{ soversion }}\\ode-config.cmake # [win] + - name: pyode requirements: run: