diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 1244454..9375de6 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -58,7 +58,7 @@ jobs: - task: CondaEnvironment@1 inputs: - packageSpecs: 'python=3.6 conda-build conda "conda-forge-ci-setup=3" pip' # Optional + packageSpecs: 'python=3.6 conda-build conda "conda-forge-ci-setup=3" pip boa' # Optional installOptions: "-c conda-forge" updateConda: true displayName: Install conda-build and activate environment @@ -92,7 +92,8 @@ jobs: - script: | call activate base - conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml + conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml + exit 1 displayName: Build recipe env: PYTHONUNBUFFERED: 1 diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index aa9727b..c73e826 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,10 @@ conda-build: root-dir: ${FEEDSTOCK_ROOT}/build_artifacts CONDARC +GET_BOA=boa +BUILD_CMD=mambabuild -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 +37,35 @@ 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" + # we are building with mambabuild, so exit with an error code for now + exit 1 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..f71fd7a 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -1,29 +1,25 @@ #!/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" +GET_BOA=boa +BUILD_CMD=mambabuild 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 +35,18 @@ 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}" - -if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then - echo -e "\n\nUploading the packages." - upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml -fi \ No newline at end of file +endgroup "Validating outputs" +# we're building with mambabuild, so fail here and DO NOT UPLOAD packages +exit 1 \ 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 97973e5..52b8f4a 100644 --- a/README.md +++ b/README.md @@ -181,9 +181,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 diff --git a/conda-forge.yml b/conda-forge.yml index 1c09752..908094e 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1 +1,2 @@ conda_forge_output_validation: true +build_with_mambabuild: True \ No newline at end of file diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9cfc0f9..4996a03 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "flake8-annotations" %} -{% set version = "2.5.0" %} +{% set version = "2.6.2" %} package: @@ -8,11 +8,11 @@ package: source: url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/flake8-annotations-{{ version }}.tar.gz - sha256: e17947a48a5b9f632fe0c72682fc797c385e451048e7dfb20139f448a074cb3e + sha256: 0d6cd2e770b5095f09689c9d84cc054c51b929c41a68969ea1beb4b825cac515 build: number: 0 - skip: true # [py>=40 or py2k] + skip: true # [py>=40 or py2k] script: {{ PYTHON }} -m pip install . -vv requirements: