diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 495c0fc..8482aa3 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -16,8 +16,8 @@ jobs: CONFIG: linux_64_python3.11.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_python3.8.____73_pypy: - CONFIG: linux_64_python3.8.____73_pypy + linux_64_python3.12.____cpython: + CONFIG: linux_64_python3.12.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_64_python3.8.____cpython: @@ -40,8 +40,8 @@ jobs: CONFIG: linux_aarch64_python3.11.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_aarch64_python3.8.____73_pypy: - CONFIG: linux_aarch64_python3.8.____73_pypy + linux_aarch64_python3.12.____cpython: + CONFIG: linux_aarch64_python3.12.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_aarch64_python3.8.____cpython: @@ -64,8 +64,8 @@ jobs: CONFIG: linux_ppc64le_python3.11.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_ppc64le_python3.8.____73_pypy: - CONFIG: linux_ppc64le_python3.8.____73_pypy + linux_ppc64le_python3.12.____cpython: + CONFIG: linux_ppc64le_python3.12.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_ppc64le_python3.8.____cpython: @@ -83,11 +83,6 @@ jobs: timeoutInMinutes: 360 steps: - - script: | - rm -rf /opt/ghc - df -h - displayName: Manage disk space - # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 79d3965..2d83e68 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -14,8 +14,8 @@ jobs: osx_64_python3.11.____cpython: CONFIG: osx_64_python3.11.____cpython UPLOAD_PACKAGES: 'True' - osx_64_python3.8.____73_pypy: - CONFIG: osx_64_python3.8.____73_pypy + osx_64_python3.12.____cpython: + CONFIG: osx_64_python3.12.____cpython UPLOAD_PACKAGES: 'True' osx_64_python3.8.____cpython: CONFIG: osx_64_python3.8.____cpython @@ -32,6 +32,9 @@ jobs: osx_arm64_python3.11.____cpython: CONFIG: osx_arm64_python3.11.____cpython UPLOAD_PACKAGES: 'True' + osx_arm64_python3.12.____cpython: + CONFIG: osx_arm64_python3.12.____cpython + UPLOAD_PACKAGES: 'True' osx_arm64_python3.8.____cpython: CONFIG: osx_arm64_python3.8.____cpython UPLOAD_PACKAGES: 'True' diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 9594b7b..752cc4d 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -5,7 +5,7 @@ jobs: - job: win pool: - vmImage: windows-2019 + vmImage: windows-2022 strategy: matrix: win_64_python3.10.____cpython: @@ -14,8 +14,8 @@ jobs: win_64_python3.11.____cpython: CONFIG: win_64_python3.11.____cpython UPLOAD_PACKAGES: 'True' - win_64_python3.8.____73_pypy: - CONFIG: win_64_python3.8.____73_pypy + win_64_python3.12.____cpython: + CONFIG: win_64_python3.12.____cpython UPLOAD_PACKAGES: 'True' win_64_python3.8.____cpython: CONFIG: win_64_python3.8.____cpython @@ -32,6 +32,7 @@ jobs: UPLOAD_TEMP: D:\\tmp steps: + - task: PythonScript@0 displayName: 'Download Miniforge' inputs: @@ -50,52 +51,14 @@ jobs: displayName: Add conda to PATH - script: | - call activate base - mamba.exe install "python=3.9" conda-build conda pip boa conda-forge-ci-setup=3 "py-lief<0.12" -c conda-forge --strict-channel-priority --yes - displayName: Install conda-build - - - script: set PYTHONUNBUFFERED=1 - displayName: Set PYTHONUNBUFFERED - - # Configure the VM - - script: | - call activate base - setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml - displayName: conda-forge CI setup - - # Configure the VM. - - script: | - set "CI=azure" - call activate base - run_conda_forge_build_setup - displayName: conda-forge build setup - - - script: | - call activate base - if EXIST LICENSE.txt ( - copy LICENSE.txt "recipe\\recipe-scripts-license.txt" - ) - conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables - displayName: Build recipe + call ".scripts\run_win_build.bat" + displayName: Run Windows build env: PYTHONUNBUFFERED: 1 - - script: | - set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" - call activate base - validate_recipe_outputs "%FEEDSTOCK_NAME%" - displayName: Validate Recipe Outputs - - - script: | - set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" - set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" - set "TEMP=$(UPLOAD_TEMP)" - if not exist "%TEMP%\" md "%TEMP%" - set "TMP=%TEMP%" - call activate base - upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml - displayName: Upload package - env: + CONFIG: $(CONFIG) + CI: azure + UPLOAD_PACKAGES: $(UPLOAD_PACKAGES) + UPLOAD_TEMP: $(UPLOAD_TEMP) BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) - condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False')), not(eq(variables['Build.Reason'], 'PullRequest'))) \ No newline at end of file + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.ci_support/linux_64_python3.10.____cpython.yaml b/.ci_support/linux_64_python3.10.____cpython.yaml index b8beea0..df1c85e 100644 --- a/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/.ci_support/linux_64_python3.10.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_name: - cos6 channel_sources: diff --git a/.ci_support/linux_64_python3.11.____cpython.yaml b/.ci_support/linux_64_python3.11.____cpython.yaml index 872f4fe..4d19d45 100644 --- a/.ci_support/linux_64_python3.11.____cpython.yaml +++ b/.ci_support/linux_64_python3.11.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_name: - cos6 channel_sources: diff --git a/.ci_support/linux_64_python3.8.____73_pypy.yaml b/.ci_support/linux_64_python3.12.____cpython.yaml similarity index 91% rename from .ci_support/linux_64_python3.8.____73_pypy.yaml rename to .ci_support/linux_64_python3.12.____cpython.yaml index 5fd2f06..25e78e2 100644 --- a/.ci_support/linux_64_python3.8.____73_pypy.yaml +++ b/.ci_support/linux_64_python3.12.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_name: - cos6 channel_sources: @@ -15,6 +15,6 @@ pin_run_as_build: min_pin: x.x max_pin: x.x python: -- 3.8.* *_73_pypy +- 3.12.* *_cpython target_platform: - linux-64 diff --git a/.ci_support/linux_64_python3.8.____cpython.yaml b/.ci_support/linux_64_python3.8.____cpython.yaml index 4dfb4a0..7288a71 100644 --- a/.ci_support/linux_64_python3.8.____cpython.yaml +++ b/.ci_support/linux_64_python3.8.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_name: - cos6 channel_sources: diff --git a/.ci_support/linux_64_python3.9.____73_pypy.yaml b/.ci_support/linux_64_python3.9.____73_pypy.yaml index 190dbe4..1de1bae 100644 --- a/.ci_support/linux_64_python3.9.____73_pypy.yaml +++ b/.ci_support/linux_64_python3.9.____73_pypy.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_name: - cos6 channel_sources: diff --git a/.ci_support/linux_64_python3.9.____cpython.yaml b/.ci_support/linux_64_python3.9.____cpython.yaml index 5cb88ef..7f7a505 100644 --- a/.ci_support/linux_64_python3.9.____cpython.yaml +++ b/.ci_support/linux_64_python3.9.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_name: - cos6 channel_sources: diff --git a/.ci_support/linux_aarch64_python3.10.____cpython.yaml b/.ci_support/linux_aarch64_python3.10.____cpython.yaml index eda8012..619d7fa 100644 --- a/.ci_support/linux_aarch64_python3.10.____cpython.yaml +++ b/.ci_support/linux_aarch64_python3.10.____cpython.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_arch: - aarch64 cdt_name: diff --git a/.ci_support/linux_aarch64_python3.11.____cpython.yaml b/.ci_support/linux_aarch64_python3.11.____cpython.yaml index 1c8ba2a..c7790b2 100644 --- a/.ci_support/linux_aarch64_python3.11.____cpython.yaml +++ b/.ci_support/linux_aarch64_python3.11.____cpython.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_arch: - aarch64 cdt_name: diff --git a/.ci_support/linux_aarch64_python3.8.____73_pypy.yaml b/.ci_support/linux_aarch64_python3.12.____cpython.yaml similarity index 92% rename from .ci_support/linux_aarch64_python3.8.____73_pypy.yaml rename to .ci_support/linux_aarch64_python3.12.____cpython.yaml index 65d10f7..199a27a 100644 --- a/.ci_support/linux_aarch64_python3.8.____73_pypy.yaml +++ b/.ci_support/linux_aarch64_python3.12.____cpython.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_arch: - aarch64 cdt_name: @@ -19,6 +19,6 @@ pin_run_as_build: min_pin: x.x max_pin: x.x python: -- 3.8.* *_73_pypy +- 3.12.* *_cpython target_platform: - linux-aarch64 diff --git a/.ci_support/linux_aarch64_python3.8.____cpython.yaml b/.ci_support/linux_aarch64_python3.8.____cpython.yaml index 45f9406..129b5bc 100644 --- a/.ci_support/linux_aarch64_python3.8.____cpython.yaml +++ b/.ci_support/linux_aarch64_python3.8.____cpython.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_arch: - aarch64 cdt_name: diff --git a/.ci_support/linux_aarch64_python3.9.____73_pypy.yaml b/.ci_support/linux_aarch64_python3.9.____73_pypy.yaml index 9965923..90f7871 100644 --- a/.ci_support/linux_aarch64_python3.9.____73_pypy.yaml +++ b/.ci_support/linux_aarch64_python3.9.____73_pypy.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_arch: - aarch64 cdt_name: diff --git a/.ci_support/linux_aarch64_python3.9.____cpython.yaml b/.ci_support/linux_aarch64_python3.9.____cpython.yaml index 02c0d4b..abf6ed9 100644 --- a/.ci_support/linux_aarch64_python3.9.____cpython.yaml +++ b/.ci_support/linux_aarch64_python3.9.____cpython.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_arch: - aarch64 cdt_name: diff --git a/.ci_support/linux_ppc64le_python3.10.____cpython.yaml b/.ci_support/linux_ppc64le_python3.10.____cpython.yaml index 0d8a86a..9523fb7 100644 --- a/.ci_support/linux_ppc64le_python3.10.____cpython.yaml +++ b/.ci_support/linux_ppc64le_python3.10.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_name: - cos7 channel_sources: diff --git a/.ci_support/linux_ppc64le_python3.11.____cpython.yaml b/.ci_support/linux_ppc64le_python3.11.____cpython.yaml index 84a653d..813ac67 100644 --- a/.ci_support/linux_ppc64le_python3.11.____cpython.yaml +++ b/.ci_support/linux_ppc64le_python3.11.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_name: - cos7 channel_sources: diff --git a/.ci_support/linux_ppc64le_python3.8.____73_pypy.yaml b/.ci_support/linux_ppc64le_python3.12.____cpython.yaml similarity index 91% rename from .ci_support/linux_ppc64le_python3.8.____73_pypy.yaml rename to .ci_support/linux_ppc64le_python3.12.____cpython.yaml index 1c4d192..518b26a 100644 --- a/.ci_support/linux_ppc64le_python3.8.____73_pypy.yaml +++ b/.ci_support/linux_ppc64le_python3.12.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_name: - cos7 channel_sources: @@ -15,6 +15,6 @@ pin_run_as_build: min_pin: x.x max_pin: x.x python: -- 3.8.* *_73_pypy +- 3.12.* *_cpython target_platform: - linux-ppc64le diff --git a/.ci_support/linux_ppc64le_python3.8.____cpython.yaml b/.ci_support/linux_ppc64le_python3.8.____cpython.yaml index 90cd733..7bb19aa 100644 --- a/.ci_support/linux_ppc64le_python3.8.____cpython.yaml +++ b/.ci_support/linux_ppc64le_python3.8.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_name: - cos7 channel_sources: diff --git a/.ci_support/linux_ppc64le_python3.9.____73_pypy.yaml b/.ci_support/linux_ppc64le_python3.9.____73_pypy.yaml index 1e288da..89d5e58 100644 --- a/.ci_support/linux_ppc64le_python3.9.____73_pypy.yaml +++ b/.ci_support/linux_ppc64le_python3.9.____73_pypy.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_name: - cos7 channel_sources: diff --git a/.ci_support/linux_ppc64le_python3.9.____cpython.yaml b/.ci_support/linux_ppc64le_python3.9.____cpython.yaml index 880b003..b6b2eff 100644 --- a/.ci_support/linux_ppc64le_python3.9.____cpython.yaml +++ b/.ci_support/linux_ppc64le_python3.9.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '11' +- '12' cdt_name: - cos7 channel_sources: diff --git a/.ci_support/migrations/python311.yaml b/.ci_support/migrations/python312.yaml similarity index 66% rename from .ci_support/migrations/python311.yaml rename to .ci_support/migrations/python312.yaml index 45d995c..00b33ef 100644 --- a/.ci_support/migrations/python311.yaml +++ b/.ci_support/migrations/python312.yaml @@ -1,4 +1,4 @@ -migrator_ts: 1666686085 +migrator_ts: 1695046563 __migrator: migration_number: 1 operation: key_add @@ -10,15 +10,16 @@ __migrator: - 3.8.* *_cpython - 3.9.* *_cpython - 3.10.* *_cpython - - 3.11.* *_cpython # new entry + - 3.11.* *_cpython + - 3.12.* *_cpython # new entry - 3.6.* *_73_pypy - 3.7.* *_73_pypy - 3.8.* *_73_pypy - 3.9.* *_73_pypy paused: false longterm: True - pr_limit: 40 - max_solver_attempts: 10 # this will make the bot retry "not solvable" stuff 10 times + pr_limit: 20 + max_solver_attempts: 3 # this will make the bot retry "not solvable" stuff 12 times exclude: # this shouldn't attempt to modify the python feedstocks - python @@ -27,11 +28,15 @@ __migrator: - cross-python - python_abi exclude_pinned_pkgs: false + additional_zip_keys: + - channel_sources python: - - 3.11.* *_cpython + - 3.12.* *_cpython +channel_sources: + - conda-forge/label/python_rc,conda-forge # additional entries to add for zip_keys numpy: - - 1.23 + - 1.26 python_impl: - cpython diff --git a/.ci_support/osx_64_python3.8.____73_pypy.yaml b/.ci_support/osx_64_python3.12.____cpython.yaml similarity index 93% rename from .ci_support/osx_64_python3.8.____73_pypy.yaml rename to .ci_support/osx_64_python3.12.____cpython.yaml index 304d155..65f129a 100644 --- a/.ci_support/osx_64_python3.8.____73_pypy.yaml +++ b/.ci_support/osx_64_python3.12.____cpython.yaml @@ -15,6 +15,6 @@ pin_run_as_build: min_pin: x.x max_pin: x.x python: -- 3.8.* *_73_pypy +- 3.12.* *_cpython target_platform: - osx-64 diff --git a/.ci_support/osx_arm64_python3.12.____cpython.yaml b/.ci_support/osx_arm64_python3.12.____cpython.yaml new file mode 100644 index 0000000..2bf4728 --- /dev/null +++ b/.ci_support/osx_arm64_python3.12.____cpython.yaml @@ -0,0 +1,20 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +c_compiler: +- clang +c_compiler_version: +- '14' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +macos_machine: +- arm64-apple-darwin20.0.0 +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.12.* *_cpython +target_platform: +- osx-arm64 diff --git a/.ci_support/win_64_python3.8.____73_pypy.yaml b/.ci_support/win_64_python3.12.____cpython.yaml similarity index 90% rename from .ci_support/win_64_python3.8.____73_pypy.yaml rename to .ci_support/win_64_python3.12.____cpython.yaml index 3434a16..2258696 100644 --- a/.ci_support/win_64_python3.8.____73_pypy.yaml +++ b/.ci_support/win_64_python3.12.____cpython.yaml @@ -9,6 +9,6 @@ pin_run_as_build: min_pin: x.x max_pin: x.x python: -- 3.8.* *_73_pypy +- 3.12.* *_cpython target_platform: - win-64 diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 84431a6..bd9e671 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -31,11 +31,10 @@ pkgs_dirs: CONDARC - -mamba install --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" -mamba update --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" +mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup=3 +mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup=3 # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh index 57bc95c..aff009f 100644 --- a/.scripts/logging_utils.sh +++ b/.scripts/logging_utils.sh @@ -12,7 +12,7 @@ function startgroup { echo "##[group]$1";; travis ) echo "$1" - echo -en 'travis_fold:start:'"${1// /}"'\\r';; + echo -en 'travis_fold:start:'"${1// /}"'\r';; github_actions ) echo "::group::$1";; * ) @@ -28,7 +28,7 @@ function endgroup { azure ) echo "##[endgroup]";; travis ) - echo -en 'travis_fold:end:'"${1// /}"'\\r';; + echo -en 'travis_fold:end:'"${1// /}"'\r';; github_actions ) echo "::endgroup::";; esac diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index b3abaeb..870c49a 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -23,10 +23,10 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} source ${MINIFORGE_HOME}/etc/profile.d/conda.sh conda activate base -mamba install --update-specs --quiet --yes --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" -mamba update --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" +mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup=3 +mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup=3 @@ -55,11 +55,6 @@ source run_conda_forge_build_setup echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml -if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then - EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" -fi - - if [[ -f LICENSE.txt ]]; then cp LICENSE.txt "recipe/recipe-scripts-license.txt" fi @@ -75,6 +70,11 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else + + if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" + fi + conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file ./.ci_support/clobber_${CONFIG}.yaml diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat new file mode 100755 index 0000000..07d3445 --- /dev/null +++ b/.scripts/run_win_build.bat @@ -0,0 +1,115 @@ +:: PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +:: will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +:: 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 +:: UPLOAD_PACKAGES: true or false +:: UPLOAD_ON_BRANCH: true or false + +setlocal enableextensions enabledelayedexpansion + +call :start_group "Configuring conda" + +:: Activate the base conda environment +call activate base + +:: Provision the necessary dependencies to build the recipe later +echo Installing dependencies +mamba.exe install "python=3.10" pip mamba conda-build boa conda-forge-ci-setup=3 -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 +if !errorlevel! neq 0 exit /b !errorlevel! +echo Running build setup +CALL run_conda_forge_build_setup + + +if !errorlevel! neq 0 exit /b !errorlevel! + +if EXIST LICENSE.txt ( + echo Copying feedstock license + copy LICENSE.txt "recipe\\recipe-scripts-license.txt" +) +if NOT [%HOST_PLATFORM%] == [%BUILD_PLATFORM%] ( + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --no-test" +) + +call :end_group + +:: Build the recipe +echo Building recipe +conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% +if !errorlevel! neq 0 exit /b !errorlevel! + +:: Prepare some environment variables for the upload step +if /i "%CI%" == "github_actions" ( + set "FEEDSTOCK_NAME=%GITHUB_REPOSITORY:*/=%" + set "GIT_BRANCH=%GITHUB_REF:refs/heads/=%" + if /i "%GITHUB_EVENT_NAME%" == "pull_request" ( + set "IS_PR_BUILD=True" + ) else ( + set "IS_PR_BUILD=False" + ) + set "TEMP=%RUNNER_TEMP%" +) +if /i "%CI%" == "azure" ( + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" + if /i "%BUILD_REASON%" == "PullRequest" ( + set "IS_PR_BUILD=True" + ) else ( + set "IS_PR_BUILD=False" + ) + set "TEMP=%UPLOAD_TEMP%" +) + +:: Validate +call :start_group "Validating outputs" +validate_recipe_outputs "%FEEDSTOCK_NAME%" +if !errorlevel! neq 0 exit /b !errorlevel! +call :end_group + +if /i "%UPLOAD_PACKAGES%" == "true" ( + if /i "%IS_PR_BUILD%" == "false" ( + call :start_group "Uploading packages" + if not exist "%TEMP%\" md "%TEMP%" + set "TMP=%TEMP%" + upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml + if !errorlevel! neq 0 exit /b !errorlevel! + call :end_group + ) +) + +exit + +:: Logging subroutines + +:start_group +if /i "%CI%" == "github_actions" ( + echo ::group::%~1 + exit /b +) +if /i "%CI%" == "azure" ( + echo ##[group]%~1 + exit /b +) +echo %~1 +exit /b + +:end_group +if /i "%CI%" == "github_actions" ( + echo ::endgroup:: + exit /b +) +if /i "%CI%" == "azure" ( + echo ##[endgroup] + exit /b +) +exit /b \ No newline at end of file diff --git a/README.md b/README.md index 81d9349..f2051ee 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -About multidict -=============== +About multidict-feedstock +========================= + +Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/multidict-feedstock/blob/main/LICENSE.txt) Home: http://github.com/aio-libs/multidict Package license: Apache-2.0 -Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/multidict-feedstock/blob/main/LICENSE.txt) - Summary: multidict implementation Development: http://github.com/aio-libs/multidict @@ -48,10 +48,10 @@ Current build status - linux_64_python3.8.____73_pypy + linux_64_python3.12.____cpython - variant + variant @@ -90,10 +90,10 @@ Current build status - linux_aarch64_python3.8.____73_pypy + linux_aarch64_python3.12.____cpython - variant + variant @@ -132,10 +132,10 @@ Current build status - linux_ppc64le_python3.8.____73_pypy + linux_ppc64le_python3.12.____cpython - variant + variant @@ -174,10 +174,10 @@ Current build status - osx_64_python3.8.____73_pypy + osx_64_python3.12.____cpython - variant + variant @@ -215,6 +215,13 @@ Current build status variant + + osx_arm64_python3.12.____cpython + + + variant + + osx_arm64_python3.8.____cpython @@ -244,10 +251,10 @@ Current build status - win_64_python3.8.____73_pypy + win_64_python3.12.____cpython - variant + variant diff --git a/conda-forge.yml b/conda-forge.yml index 6c7a233..0828bfb 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -2,6 +2,8 @@ build_platform: linux_aarch64: linux_64 linux_ppc64le: linux_64 osx_arm64: osx_64 +conda_build: + pkg_format: '2' conda_forge_output_validation: true github: branch_name: main @@ -11,5 +13,3 @@ provider: linux_ppc64le: default win: azure test_on_native_only: true -conda_build: - pkg_format: '2' diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml new file mode 100644 index 0000000..12172e4 --- /dev/null +++ b/recipe/conda_build_config.yaml @@ -0,0 +1,4 @@ +# stay on clang 14 because multidict 6.0.4 still +# uses NULL-to-int conversions that clang >14 errors on +c_compiler_version: # [osx] + - 14 # [osx] diff --git a/recipe/meta.yaml b/recipe/meta.yaml index f001984..2cd3388 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,20 +1,19 @@ -{% set name = "multidict" %} {% set version = "6.0.4" %} -{% set sha256 = "3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49" %} package: - name: {{ name|lower }} + name: multidict version: {{ version }} source: - fn: {{ name }}-{{ version }}.tar.gz - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz - sha256: {{ sha256 }} + url: https://pypi.io/packages/source/m/multidict/multidict-{{ version }}.tar.gz + sha256: 3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49 + patches: + # backport https://github.com/aio-libs/multidict/pull/864 + - patches/0001-Fix-usage-python-C-API-for-version-greater-3.9-and-f.patch build: - number: 0 + number: 1 script: {{ PYTHON }} -m pip install . --no-deps -vv - skip: true # [py2k] requirements: build: diff --git a/recipe/patches/0001-Fix-usage-python-C-API-for-version-greater-3.9-and-f.patch b/recipe/patches/0001-Fix-usage-python-C-API-for-version-greater-3.9-and-f.patch new file mode 100644 index 0000000..d2e1541 --- /dev/null +++ b/recipe/patches/0001-Fix-usage-python-C-API-for-version-greater-3.9-and-f.patch @@ -0,0 +1,303 @@ +From f3d619304a6294c89c71eca09cb0e90ab5334a38 Mon Sep 17 00:00:00 2001 +From: Igor Yemelyanov +Date: Sat, 22 Jul 2023 01:49:29 +0300 +Subject: [PATCH] Fix usage python C API for version greater 3.9 and fix + segfault + +* Fix version macros + +* Mov str_lower into global vars for use in istr and pair_list + +* Fix macros usage +--- + multidict/_multidict.c | 28 +++++++++++++++-- + multidict/_multilib/defs.h | 4 +++ + multidict/_multilib/istr.h | 4 +++ + multidict/_multilib/pair_list.h | 55 ++++++++++++++++++++------------- + 4 files changed, 67 insertions(+), 24 deletions(-) + +diff --git a/multidict/_multidict.c b/multidict/_multidict.c +index 1ba79df..bcb3713 100644 +--- a/multidict/_multidict.c ++++ b/multidict/_multidict.c +@@ -709,13 +709,21 @@ static inline void + multidict_tp_dealloc(MultiDictObject *self) + { + PyObject_GC_UnTrack(self); ++#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 9 ++ Py_TRASHCAN_BEGIN(self, multidict_tp_dealloc) ++#else + Py_TRASHCAN_SAFE_BEGIN(self); ++#endif + if (self->weaklist != NULL) { + PyObject_ClearWeakRefs((PyObject *)self); + }; + pair_list_dealloc(&self->pairs); + Py_TYPE(self)->tp_free((PyObject *)self); ++#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 9 ++ Py_TRASHCAN_END // there should be no code after this ++#else + Py_TRASHCAN_SAFE_END(self); ++#endif + } + + static inline int +@@ -777,9 +785,12 @@ multidict_add(MultiDictObject *self, PyObject *const *args, + return NULL; + } + #else +- static _PyArg_Parser _parser = {NULL, _keywords, "add", 0}; ++ static _PyArg_Parser _parser = { ++ .keywords = _keywords, ++ .fname = "add", ++ .kwtuple = NULL, ++ }; + PyObject *argsbuf[2]; +- + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, + &_parser, 2, 2, 0, argsbuf); + if (!args) { +@@ -1655,6 +1666,9 @@ getversion(PyObject *self, PyObject *md) + static inline void + module_free(void *m) + { ++#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 9 ++ Py_CLEAR(multidict_str_lower); ++#endif + Py_CLEAR(collections_abc_mapping); + Py_CLEAR(collections_abc_mut_mapping); + Py_CLEAR(collections_abc_mut_multi_mapping); +@@ -1683,6 +1697,13 @@ static PyModuleDef multidict_module = { + PyMODINIT_FUNC + PyInit__multidict() + { ++#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 9 ++ multidict_str_lower = PyUnicode_InternFromString("lower"); ++ if (multidict_str_lower == NULL) { ++ goto fail; ++ } ++#endif ++ + PyObject *module = NULL, + *reg_func_call_result = NULL; + +@@ -1813,6 +1834,9 @@ PyInit__multidict() + return module; + + fail: ++#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 9 ++ Py_XDECREF(multidict_str_lower); ++#endif + Py_XDECREF(collections_abc_mapping); + Py_XDECREF(collections_abc_mut_mapping); + Py_XDECREF(collections_abc_mut_multi_mapping); +diff --git a/multidict/_multilib/defs.h b/multidict/_multilib/defs.h +index c7027c8..55c2107 100644 +--- a/multidict/_multilib/defs.h ++++ b/multidict/_multilib/defs.h +@@ -5,7 +5,11 @@ + extern "C" { + #endif + ++#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 9 ++static PyObject *multidict_str_lower = NULL; ++#else + _Py_IDENTIFIER(lower); ++#endif + + /* We link this module statically for convenience. If compiled as a shared + library instead, some compilers don't allow addresses of Python objects +diff --git a/multidict/_multilib/istr.h b/multidict/_multilib/istr.h +index 2688f48..61dc61a 100644 +--- a/multidict/_multilib/istr.h ++++ b/multidict/_multilib/istr.h +@@ -43,7 +43,11 @@ istr_new(PyTypeObject *type, PyObject *args, PyObject *kwds) + if (!ret) { + goto fail; + } ++#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 9 ++ s = PyObject_CallMethodNoArgs(ret, multidict_str_lower); ++#else + s =_PyObject_CallMethodId(ret, &PyId_lower, NULL); ++#endif + if (!s) { + goto fail; + } +diff --git a/multidict/_multilib/pair_list.h b/multidict/_multilib/pair_list.h +index 7eafd21..15291d4 100644 +--- a/multidict/_multilib/pair_list.h ++++ b/multidict/_multilib/pair_list.h +@@ -8,8 +8,7 @@ extern "C" { + #include + #include + #include +- +-typedef PyObject * (*calc_identity_func)(PyObject *key); ++#include + + typedef struct pair { + PyObject *identity; // 8 +@@ -38,12 +37,12 @@ HTTP headers into the buffer without allocating an extra memory block. + #define EMBEDDED_CAPACITY 29 + #endif + +-typedef struct pair_list { // 40 +- Py_ssize_t capacity; // 8 +- Py_ssize_t size; // 8 +- uint64_t version; // 8 +- calc_identity_func calc_identity; // 8 +- pair_t *pairs; // 8 ++typedef struct pair_list { ++ Py_ssize_t capacity; ++ Py_ssize_t size; ++ uint64_t version; ++ bool calc_ci_indentity; ++ pair_t *pairs; + pair_t buffer[EMBEDDED_CAPACITY]; + } pair_list_t; + +@@ -111,7 +110,11 @@ ci_key_to_str(PyObject *key) + return ret; + } + if (PyUnicode_Check(key)) { ++#if PY_VERSION_HEX < 0x03090000 + return _PyObject_CallMethodId(key, &PyId_lower, NULL); ++#else ++ return PyObject_CallMethodNoArgs(key, multidict_str_lower); ++#endif + } + PyErr_SetString(PyExc_TypeError, + "CIMultiDict keys should be either str " +@@ -199,30 +202,38 @@ pair_list_shrink(pair_list_t *list) + + + static inline int +-_pair_list_init(pair_list_t *list, calc_identity_func calc_identity) ++_pair_list_init(pair_list_t *list, bool calc_ci_identity) + { ++ list->calc_ci_indentity = calc_ci_identity; + list->pairs = list->buffer; + list->capacity = EMBEDDED_CAPACITY; + list->size = 0; + list->version = NEXT_VERSION(); +- list->calc_identity = calc_identity; + return 0; + } + + static inline int + pair_list_init(pair_list_t *list) + { +- return _pair_list_init(list, key_to_str); ++ return _pair_list_init(list, /* calc_ci_identity = */ false); + } + + + static inline int + ci_pair_list_init(pair_list_t *list) + { +- return _pair_list_init(list, ci_key_to_str); ++ return _pair_list_init(list, /* calc_ci_identity = */ true); + } + + ++static inline PyObject * ++pair_list_calc_identity(pair_list_t *list, PyObject *key) ++{ ++ if (list->calc_ci_indentity) ++ return ci_key_to_str(key); ++ return key_to_str(key); ++} ++ + static inline void + pair_list_dealloc(pair_list_t *list) + { +@@ -304,7 +315,7 @@ pair_list_add(pair_list_t *list, + PyObject *identity = NULL; + int ret; + +- identity = list->calc_identity(key); ++ identity = pair_list_calc_identity(list, key); + if (identity == NULL) { + goto fail; + } +@@ -412,7 +423,7 @@ pair_list_del(pair_list_t *list, PyObject *key) + Py_hash_t hash; + int ret; + +- identity = list->calc_identity(key); ++ identity = pair_list_calc_identity(list, key); + if (identity == NULL) { + goto fail; + } +@@ -486,7 +497,7 @@ pair_list_contains(pair_list_t *list, PyObject *key) + PyObject *identity = NULL; + int tmp; + +- ident = list->calc_identity(key); ++ ident = pair_list_calc_identity(list, key); + if (ident == NULL) { + goto fail; + } +@@ -528,7 +539,7 @@ pair_list_get_one(pair_list_t *list, PyObject *key) + PyObject *value = NULL; + int tmp; + +- ident = list->calc_identity(key); ++ ident = pair_list_calc_identity(list, key); + if (ident == NULL) { + goto fail; + } +@@ -573,7 +584,7 @@ pair_list_get_all(pair_list_t *list, PyObject *key) + PyObject *res = NULL; + int tmp; + +- ident = list->calc_identity(key); ++ ident = pair_list_calc_identity(list, key); + if (ident == NULL) { + goto fail; + } +@@ -631,7 +642,7 @@ pair_list_set_default(pair_list_t *list, PyObject *key, PyObject *value) + PyObject *value2 = NULL; + int tmp; + +- ident = list->calc_identity(key); ++ ident = pair_list_calc_identity(list, key); + if (ident == NULL) { + goto fail; + } +@@ -680,7 +691,7 @@ pair_list_pop_one(pair_list_t *list, PyObject *key) + int tmp; + PyObject *ident = NULL; + +- ident = list->calc_identity(key); ++ ident = pair_list_calc_identity(list, key); + if (ident == NULL) { + goto fail; + } +@@ -730,7 +741,7 @@ pair_list_pop_all(pair_list_t *list, PyObject *key) + PyObject *res = NULL; + PyObject *ident = NULL; + +- ident = list->calc_identity(key); ++ ident = pair_list_calc_identity(list, key); + if (ident == NULL) { + goto fail; + } +@@ -826,7 +837,7 @@ pair_list_replace(pair_list_t *list, PyObject * key, PyObject *value) + PyObject *identity = NULL; + Py_hash_t hash; + +- identity = list->calc_identity(key); ++ identity = pair_list_calc_identity(list, key); + if (identity == NULL) { + goto fail; + } +@@ -1101,7 +1112,7 @@ pair_list_update_from_seq(pair_list_t *list, PyObject *seq) + Py_INCREF(key); + Py_INCREF(value); + +- identity = list->calc_identity(key); ++ identity = pair_list_calc_identity(list, key); + if (identity == NULL) { + goto fail_1; + }