diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 3adf3ac..16a1d32 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -11,15 +11,15 @@ jobs: linux_64_python3.7.____cpython: CONFIG: linux_64_python3.7.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_64_python3.8.____cpython: CONFIG: linux_64_python3.8.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_64_python3.9.____cpython: CONFIG: linux_64_python3.9.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 steps: @@ -40,6 +40,11 @@ jobs: export CI=azure 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: diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 46f2d97..7c4c40e 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -26,6 +26,11 @@ jobs: 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: diff --git a/.ci_support/linux_64_python3.7.____cpython.yaml b/.ci_support/linux_64_python3.7.____cpython.yaml index 0466c6e..9a71c28 100644 --- a/.ci_support/linux_64_python3.7.____cpython.yaml +++ b/.ci_support/linux_64_python3.7.____cpython.yaml @@ -1,3 +1,7 @@ +c_compiler: +- gcc +c_compiler_version: +- '9' cdt_name: - cos6 channel_sources: @@ -9,7 +13,7 @@ cxx_compiler: cxx_compiler_version: - '9' docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x @@ -19,5 +23,5 @@ python: target_platform: - linux-64 zip_keys: -- - cdt_name - - docker_image +- - c_compiler_version + - cxx_compiler_version diff --git a/.ci_support/linux_64_python3.8.____cpython.yaml b/.ci_support/linux_64_python3.8.____cpython.yaml index 6271a43..ac26fa9 100644 --- a/.ci_support/linux_64_python3.8.____cpython.yaml +++ b/.ci_support/linux_64_python3.8.____cpython.yaml @@ -1,3 +1,7 @@ +c_compiler: +- gcc +c_compiler_version: +- '9' cdt_name: - cos6 channel_sources: @@ -9,7 +13,7 @@ cxx_compiler: cxx_compiler_version: - '9' docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x @@ -19,5 +23,5 @@ python: target_platform: - linux-64 zip_keys: -- - cdt_name - - docker_image +- - c_compiler_version + - cxx_compiler_version diff --git a/.ci_support/linux_64_python3.9.____cpython.yaml b/.ci_support/linux_64_python3.9.____cpython.yaml index c7eca7b..cedba7d 100644 --- a/.ci_support/linux_64_python3.9.____cpython.yaml +++ b/.ci_support/linux_64_python3.9.____cpython.yaml @@ -1,3 +1,7 @@ +c_compiler: +- gcc +c_compiler_version: +- '9' cdt_name: - cos6 channel_sources: @@ -9,7 +13,7 @@ cxx_compiler: cxx_compiler_version: - '9' docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x @@ -19,5 +23,5 @@ python: target_platform: - linux-64 zip_keys: -- - cdt_name - - docker_image +- - c_compiler_version + - cxx_compiler_version diff --git a/.ci_support/osx_64_python3.7.____cpython.yaml b/.ci_support/osx_64_python3.7.____cpython.yaml index 7a5221d..8ac9847 100644 --- a/.ci_support/osx_64_python3.7.____cpython.yaml +++ b/.ci_support/osx_64_python3.7.____cpython.yaml @@ -1,5 +1,9 @@ MACOSX_DEPLOYMENT_TARGET: - '10.9' +c_compiler: +- clang +c_compiler_version: +- '11' channel_sources: - conda-forge channel_targets: @@ -18,3 +22,6 @@ python: - 3.7.* *_cpython target_platform: - osx-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version diff --git a/.ci_support/osx_64_python3.8.____cpython.yaml b/.ci_support/osx_64_python3.8.____cpython.yaml index 45fc72b..adc468f 100644 --- a/.ci_support/osx_64_python3.8.____cpython.yaml +++ b/.ci_support/osx_64_python3.8.____cpython.yaml @@ -1,5 +1,9 @@ MACOSX_DEPLOYMENT_TARGET: - '10.9' +c_compiler: +- clang +c_compiler_version: +- '11' channel_sources: - conda-forge channel_targets: @@ -18,3 +22,6 @@ python: - 3.8.* *_cpython target_platform: - osx-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version diff --git a/.ci_support/osx_64_python3.9.____cpython.yaml b/.ci_support/osx_64_python3.9.____cpython.yaml index fbbd469..0401309 100644 --- a/.ci_support/osx_64_python3.9.____cpython.yaml +++ b/.ci_support/osx_64_python3.9.____cpython.yaml @@ -1,5 +1,9 @@ MACOSX_DEPLOYMENT_TARGET: - '10.9' +c_compiler: +- clang +c_compiler_version: +- '11' channel_sources: - conda-forge channel_targets: @@ -18,3 +22,6 @@ python: - 3.9.* *_cpython target_platform: - osx-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version diff --git a/.gitattributes b/.gitattributes index 9060b27..ce52713 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,6 +18,7 @@ bld.bat text eol=crlf .gitignore linguist-generated=true .travis.yml linguist-generated=true .scripts/* linguist-generated=true +.woodpecker.yml linguist-generated=true LICENSE.txt linguist-generated=true README.md linguist-generated=true azure-pipelines.yml linguist-generated=true diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 71a0686..ff01283 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -5,6 +5,8 @@ # changes to this script, consider a proposal to conda-smithy so that other feedstocks can also # benefit from the improvement. +# -*- mode: jinja-shell -*- + set -xeuo pipefail export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh @@ -25,9 +27,10 @@ conda-build: root-dir: ${FEEDSTOCK_ROOT}/build_artifacts CONDARC -BUILD_CMD=build -conda install --yes --quiet "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} -c conda-forge + +mamba install --update-specs --yes --quiet "conda-forge-ci-setup=3" conda-build pip boa -c conda-forge +mamba update --update-specs --yes --quiet "conda-forge-ci-setup=3" conda-build pip boa -c conda-forge # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -38,6 +41,7 @@ source run_conda_forge_build_setup make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + ( endgroup "Configuring conda" ) 2> /dev/null if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then @@ -51,7 +55,7 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda $BUILD_CMD "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" ( startgroup "Validating outputs" ) 2> /dev/null @@ -62,7 +66,7 @@ else ( startgroup "Uploading packages" ) 2> /dev/null - if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then + if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" fi diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 244ccd1..0c6515f 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -75,12 +75,15 @@ fi ( 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 \ -e CONFIG \ -e HOST_USER_ID \ -e UPLOAD_PACKAGES \ + -e IS_PR_BUILD \ -e GIT_BRANCH \ -e UPLOAD_ON_BRANCH \ -e CI \ @@ -91,9 +94,9 @@ docker run ${DOCKER_RUN_ARGS} \ -e BINSTAR_TOKEN \ -e FEEDSTOCK_TOKEN \ -e STAGING_BINSTAR_TOKEN \ - $DOCKER_IMAGE \ + "${DOCKER_IMAGE}" \ bash \ - /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh + "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh" # verify that the end of the script was reached test -f "$DONE_CANARY" diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 96d0278..d10e0c2 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +# -*- mode: jinja-shell -*- + source .scripts/logging_utils.sh set -xe @@ -9,21 +11,21 @@ MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} ( 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-x86_64.sh" +MINIFORGE_FILE="Mambaforge-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 "Configuring conda" ) 2> /dev/null -BUILD_CMD=build - source ${MINIFORGE_HOME}/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 ${GET_BOA:-} +mamba install -n base --update-specs --quiet --yes "conda-forge-ci-setup=3" conda-build pip boa +mamba update -n base --update-specs --quiet --yes "conda-forge-ci-setup=3" conda-build pip boa @@ -53,7 +55,7 @@ source run_conda_forge_build_setup echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml -conda $BUILD_CMD ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} +conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" @@ -62,7 +64,7 @@ validate_recipe_outputs "${FEEDSTOCK_NAME}" ( startgroup "Uploading packages" ) 2> /dev/null -if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then +if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml fi diff --git a/LICENSE.txt b/LICENSE.txt index ed3f451..6ec1401 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ BSD 3-clause license -Copyright (c) 2015-2021, conda-forge contributors +Copyright (c) 2015-2022, 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 5c4feab..4876acc 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,8 @@ conda search libsemigroups_pybind11 --channel conda-forge About conda-forge ================= -[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](http://numfocus.org) +[![Powered by +NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org) conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the diff --git a/build-locally.py b/build-locally.py index 00eeb34..8b74348 100755 --- a/build-locally.py +++ b/build-locally.py @@ -13,6 +13,7 @@ def setup_environment(ns): os.environ["CONFIG"] = ns.config os.environ["UPLOAD_PACKAGES"] = "False" + os.environ["IS_PR_BUILD"] = "True" if ns.debug: os.environ["BUILD_WITH_CONDA_DEBUG"] = "1" if ns.output_id: @@ -21,6 +22,10 @@ def setup_environment(ns): os.environ["MINIFORGE_HOME"] = os.path.join( os.path.dirname(__file__), "miniforge3" ) + if "OSX_SDK_DIR" not in os.environ: + os.environ["OSX_SDK_DIR"] = os.path.join( + os.path.dirname(__file__), "SDKs" + ) def run_docker_build(ns): diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 925e1c9..a1fce08 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "libsemigroups_pybind11" %} -{% set version = "0.1.1" %} +{% set version = "0.1.5" %} package: name: libsemigroups_pybind11 @@ -7,7 +7,7 @@ package: source: url: https://github.com/libsemigroups/libsemigroups_pybind11/archive/refs/tags/v{{ version }}.tar.gz - sha256: a51878de09443d9e632a0c502aaa47b314a54ee793731c20f1874896890dfecb + sha256: c1d931d128439f851cb731cce6e55d2240aa9cf8a1a92599d48b83d287f8b882 build: number: 0 @@ -16,7 +16,9 @@ build: requirements: build: + - {{ compiler('c') }} - {{ compiler('cxx') }} + - pkg-config host: - python - pip @@ -24,6 +26,7 @@ requirements: - pkgconfig >=0.29.2 - packaging >=20.4 - pybind11 >=2.6 + - eigen run: - python - libsemigroups >=2.0.2 @@ -32,19 +35,15 @@ requirements: test: imports: - libsemigroups_pybind11 - requires: - - pytest=6.2.4 - source_files: - - tests/ commands: - - pytest -vv tests/test_*.py + - pip check about: home: https://libsemigroups.github.io/ license: GPL-3.0-or-later license_family: GPL license_file: LICENSE - summary: 'Python package for using the C++ library libsemigroups via pybind11' + summary: Python package for using the C++ library libsemigroups via pybind11 dev_url: https://github.com/libsemigroups/libsemigroups_pybind11 extra: