diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 428e0ae..c06a2c8 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -8,24 +8,24 @@ jobs: vmImage: ubuntu-latest strategy: matrix: - linux_64_numpy1.22python3.10.____cpython: - CONFIG: linux_64_numpy1.22python3.10.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_64_numpy1.22python3.8.____cpython: CONFIG: linux_64_numpy1.22python3.8.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_numpy1.22python3.9.____cpython: - CONFIG: linux_64_numpy1.22python3.9.____cpython + linux_64_numpy2.0python3.10.____cpython: + CONFIG: linux_64_numpy2.0python3.10.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + linux_64_numpy2.0python3.11.____cpython: + CONFIG: linux_64_numpy2.0python3.11.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_numpy1.23python3.11.____cpython: - CONFIG: linux_64_numpy1.23python3.11.____cpython + linux_64_numpy2.0python3.12.____cpython: + CONFIG: linux_64_numpy2.0python3.12.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_numpy1.26python3.12.____cpython: - CONFIG: linux_64_numpy1.26python3.12.____cpython + linux_64_numpy2.0python3.9.____cpython: + CONFIG: linux_64_numpy2.0python3.9.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 06625bc..102b02a 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,23 +5,23 @@ jobs: - job: osx pool: - vmImage: macOS-11 + vmImage: macOS-12 strategy: matrix: - osx_64_numpy1.22python3.10.____cpython: - CONFIG: osx_64_numpy1.22python3.10.____cpython - UPLOAD_PACKAGES: 'True' osx_64_numpy1.22python3.8.____cpython: CONFIG: osx_64_numpy1.22python3.8.____cpython UPLOAD_PACKAGES: 'True' - osx_64_numpy1.22python3.9.____cpython: - CONFIG: osx_64_numpy1.22python3.9.____cpython + osx_64_numpy2.0python3.10.____cpython: + CONFIG: osx_64_numpy2.0python3.10.____cpython + UPLOAD_PACKAGES: 'True' + osx_64_numpy2.0python3.11.____cpython: + CONFIG: osx_64_numpy2.0python3.11.____cpython UPLOAD_PACKAGES: 'True' - osx_64_numpy1.23python3.11.____cpython: - CONFIG: osx_64_numpy1.23python3.11.____cpython + osx_64_numpy2.0python3.12.____cpython: + CONFIG: osx_64_numpy2.0python3.12.____cpython UPLOAD_PACKAGES: 'True' - osx_64_numpy1.26python3.12.____cpython: - CONFIG: osx_64_numpy1.26python3.12.____cpython + osx_64_numpy2.0python3.9.____cpython: + CONFIG: osx_64_numpy2.0python3.9.____cpython UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 variables: {} diff --git a/.ci_support/linux_64_numpy1.22python3.8.____cpython.yaml b/.ci_support/linux_64_numpy1.22python3.8.____cpython.yaml index 8abecf9..9c2c981 100644 --- a/.ci_support/linux_64_numpy1.22python3.8.____cpython.yaml +++ b/.ci_support/linux_64_numpy1.22python3.8.____cpython.yaml @@ -9,7 +9,7 @@ c_stdlib_version: cdt_name: - cos6 channel_sources: -- conda-forge +- conda-forge/label/numpy_rc,conda-forge channel_targets: - conda-forge main docker_image: diff --git a/.ci_support/linux_64_numpy1.22python3.10.____cpython.yaml b/.ci_support/linux_64_numpy2.0python3.10.____cpython.yaml similarity index 92% rename from .ci_support/linux_64_numpy1.22python3.10.____cpython.yaml rename to .ci_support/linux_64_numpy2.0python3.10.____cpython.yaml index 6adb016..2b6dd39 100644 --- a/.ci_support/linux_64_numpy1.22python3.10.____cpython.yaml +++ b/.ci_support/linux_64_numpy2.0python3.10.____cpython.yaml @@ -9,7 +9,7 @@ c_stdlib_version: cdt_name: - cos6 channel_sources: -- conda-forge +- conda-forge/label/numpy_rc,conda-forge channel_targets: - conda-forge main docker_image: @@ -27,7 +27,7 @@ libnetcdf: libuuid: - '2' numpy: -- '1.22' +- '2.0' openblas: - 0.3.* pin_run_as_build: diff --git a/.ci_support/linux_64_numpy1.23python3.11.____cpython.yaml b/.ci_support/linux_64_numpy2.0python3.11.____cpython.yaml similarity index 92% rename from .ci_support/linux_64_numpy1.23python3.11.____cpython.yaml rename to .ci_support/linux_64_numpy2.0python3.11.____cpython.yaml index 0600de1..e223b2d 100644 --- a/.ci_support/linux_64_numpy1.23python3.11.____cpython.yaml +++ b/.ci_support/linux_64_numpy2.0python3.11.____cpython.yaml @@ -9,7 +9,7 @@ c_stdlib_version: cdt_name: - cos6 channel_sources: -- conda-forge +- conda-forge/label/numpy_rc,conda-forge channel_targets: - conda-forge main docker_image: @@ -27,7 +27,7 @@ libnetcdf: libuuid: - '2' numpy: -- '1.23' +- '2.0' openblas: - 0.3.* pin_run_as_build: diff --git a/.ci_support/linux_64_numpy1.26python3.12.____cpython.yaml b/.ci_support/linux_64_numpy2.0python3.12.____cpython.yaml similarity index 92% rename from .ci_support/linux_64_numpy1.26python3.12.____cpython.yaml rename to .ci_support/linux_64_numpy2.0python3.12.____cpython.yaml index 6bd51f5..e7390b1 100644 --- a/.ci_support/linux_64_numpy1.26python3.12.____cpython.yaml +++ b/.ci_support/linux_64_numpy2.0python3.12.____cpython.yaml @@ -9,7 +9,7 @@ c_stdlib_version: cdt_name: - cos6 channel_sources: -- conda-forge +- conda-forge/label/numpy_rc,conda-forge channel_targets: - conda-forge main docker_image: @@ -27,7 +27,7 @@ libnetcdf: libuuid: - '2' numpy: -- '1.26' +- '2.0' openblas: - 0.3.* pin_run_as_build: diff --git a/.ci_support/linux_64_numpy1.22python3.9.____cpython.yaml b/.ci_support/linux_64_numpy2.0python3.9.____cpython.yaml similarity index 92% rename from .ci_support/linux_64_numpy1.22python3.9.____cpython.yaml rename to .ci_support/linux_64_numpy2.0python3.9.____cpython.yaml index ff142e5..09d29c8 100644 --- a/.ci_support/linux_64_numpy1.22python3.9.____cpython.yaml +++ b/.ci_support/linux_64_numpy2.0python3.9.____cpython.yaml @@ -9,7 +9,7 @@ c_stdlib_version: cdt_name: - cos6 channel_sources: -- conda-forge +- conda-forge/label/numpy_rc,conda-forge channel_targets: - conda-forge main docker_image: @@ -27,7 +27,7 @@ libnetcdf: libuuid: - '2' numpy: -- '1.22' +- '2.0' openblas: - 0.3.* pin_run_as_build: diff --git a/.ci_support/migrations/hdf51142.yaml b/.ci_support/migrations/hdf51142.yaml deleted file mode 100644 index 1517ced..0000000 --- a/.ci_support/migrations/hdf51142.yaml +++ /dev/null @@ -1,7 +0,0 @@ -__migrator: - build_number: 1 - kind: version - migration_number: 1 -hdf5: -- 1.14.2 -migrator_ts: 1692590899.44706 diff --git a/.ci_support/migrations/numpy2.yaml b/.ci_support/migrations/numpy2.yaml new file mode 100644 index 0000000..b620607 --- /dev/null +++ b/.ci_support/migrations/numpy2.yaml @@ -0,0 +1,74 @@ +__migrator: + build_number: 1 + kind: version + commit_message: | + Rebuild for numpy 2.0 + + TL;DR: The way we build against numpy has changed as of numpy 2.0. This bot + PR has updated the recipe to account for the changes (see below for details). + The numpy 2.0 package itself is currently only available from a special release + channel (`conda-forge/label/numpy_rc`) and will not be available on the main + `conda-forge` channel until the release of numpy 2.0 GA. + + The biggest change is that we no longer need to use the oldest available numpy + version at build time in order to support old numpy version at runtime - numpy + will by default use a compatible ABI for the oldest still-supported numpy versions. + + Additionally, we no longer need to use `{{ pin_compatible("numpy") }}` as a + run requirement - this has been handled for more than two years now by a + run-export on the numpy package itself. The migrator will therefore remove + any occurrences of this. + + However, by default, building against numpy 2.0 will assume that the package + is compatible with numpy 2.0, which is not necessarily the case. You should + check that the upstream package explicitly supports numpy 2.0, otherwise you + need to add a `- numpy <2` run requirement until that happens (check numpy + issue 26191 for an overview of the most important packages). + + Note that the numpy release candidate promises to be ABI-compatible with the + final 2.0 release. This means that building against 2.0.0rc1 produces packages + that can be published to our main channels. + + If you already want to use the numpy 2.0 release candidate yourself, you can do + ``` + conda config --add channels conda-forge/label/numpy_rc + ``` + or add this channel to your `.condarc` file directly. + + ### To-Dos: + * [ ] Match run-requirements for numpy (i.e. check upstream `pyproject.toml` or however the project specifies numpy compatibility) + * If upstream is not yet compatible with numpy 2.0, add `numpy <2` upper bound under `run:`. + * If upstream is already compatible with numpy 2.0, nothing else should be necessary in most cases. + * If upstream requires a minimum numpy version newer than 1.19, you can add `numpy >=x.y` under `run:`. + * [ ] Remove any remaining occurrences of `{{ pin_compatible("numpy") }}` that the bot may have missed. + + PS. If the build does not compile anymore, this is almost certainly a sign that + the upstream project is not yet ready for numpy 2.0; do not close this PR until + a version compatible with numpy 2.0 has been released upstream and on this + feedstock (in the meantime, you can keep the bot from reopening this PR in + case of git conflicts by marking it as a draft). + + migration_number: 1 + exclude: + # needs local overrides that get stomped on by the migrator, which then fails + - scipy + # already done, but thinks its unsolvable + - pandas + ordering: + # prefer channels including numpy_rc (otherwise smithy doesn't + # know which of the two values should be taken on merge) + channel_sources: + - conda-forge + - conda-forge/label/numpy_rc,conda-forge + +# needs to match length of zip {python, python_impl, numpy} +# as it is in global CBC in order to override it +numpy: + - 1.22 # no py38 support for numpy 2.0 + - 2.0 + - 2.0 + - 2.0 + - 2.0 +channel_sources: + - conda-forge/label/numpy_rc,conda-forge +migrator_ts: 1713572489.295986 diff --git a/.ci_support/osx_64_numpy1.22python3.8.____cpython.yaml b/.ci_support/osx_64_numpy1.22python3.8.____cpython.yaml index 4b3b5fa..ff4becb 100644 --- a/.ci_support/osx_64_numpy1.22python3.8.____cpython.yaml +++ b/.ci_support/osx_64_numpy1.22python3.8.____cpython.yaml @@ -1,5 +1,7 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_compiler: - clang c_compiler_version: @@ -7,9 +9,9 @@ c_compiler_version: c_stdlib: - macosx_deployment_target c_stdlib_version: -- '10.9' +- '10.13' channel_sources: -- conda-forge +- conda-forge/label/numpy_rc,conda-forge channel_targets: - conda-forge main fortran_compiler: diff --git a/.ci_support/osx_64_numpy1.22python3.10.____cpython.yaml b/.ci_support/osx_64_numpy2.0python3.10.____cpython.yaml similarity index 85% rename from .ci_support/osx_64_numpy1.22python3.10.____cpython.yaml rename to .ci_support/osx_64_numpy2.0python3.10.____cpython.yaml index 3abcf6e..b0ca4c3 100644 --- a/.ci_support/osx_64_numpy1.22python3.10.____cpython.yaml +++ b/.ci_support/osx_64_numpy2.0python3.10.____cpython.yaml @@ -1,5 +1,7 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_compiler: - clang c_compiler_version: @@ -7,9 +9,9 @@ c_compiler_version: c_stdlib: - macosx_deployment_target c_stdlib_version: -- '10.9' +- '10.13' channel_sources: -- conda-forge +- conda-forge/label/numpy_rc,conda-forge channel_targets: - conda-forge main fortran_compiler: @@ -27,7 +29,7 @@ libuuid: macos_machine: - x86_64-apple-darwin13.4.0 numpy: -- '1.22' +- '2.0' openblas: - 0.3.* pin_run_as_build: diff --git a/.ci_support/osx_64_numpy1.23python3.11.____cpython.yaml b/.ci_support/osx_64_numpy2.0python3.11.____cpython.yaml similarity index 85% rename from .ci_support/osx_64_numpy1.23python3.11.____cpython.yaml rename to .ci_support/osx_64_numpy2.0python3.11.____cpython.yaml index 7e92f80..0125f8b 100644 --- a/.ci_support/osx_64_numpy1.23python3.11.____cpython.yaml +++ b/.ci_support/osx_64_numpy2.0python3.11.____cpython.yaml @@ -1,5 +1,7 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_compiler: - clang c_compiler_version: @@ -7,9 +9,9 @@ c_compiler_version: c_stdlib: - macosx_deployment_target c_stdlib_version: -- '10.9' +- '10.13' channel_sources: -- conda-forge +- conda-forge/label/numpy_rc,conda-forge channel_targets: - conda-forge main fortran_compiler: @@ -27,7 +29,7 @@ libuuid: macos_machine: - x86_64-apple-darwin13.4.0 numpy: -- '1.23' +- '2.0' openblas: - 0.3.* pin_run_as_build: diff --git a/.ci_support/osx_64_numpy1.26python3.12.____cpython.yaml b/.ci_support/osx_64_numpy2.0python3.12.____cpython.yaml similarity index 85% rename from .ci_support/osx_64_numpy1.26python3.12.____cpython.yaml rename to .ci_support/osx_64_numpy2.0python3.12.____cpython.yaml index 8195662..b9bcc8f 100644 --- a/.ci_support/osx_64_numpy1.26python3.12.____cpython.yaml +++ b/.ci_support/osx_64_numpy2.0python3.12.____cpython.yaml @@ -1,5 +1,7 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_compiler: - clang c_compiler_version: @@ -7,9 +9,9 @@ c_compiler_version: c_stdlib: - macosx_deployment_target c_stdlib_version: -- '10.9' +- '10.13' channel_sources: -- conda-forge +- conda-forge/label/numpy_rc,conda-forge channel_targets: - conda-forge main fortran_compiler: @@ -27,7 +29,7 @@ libuuid: macos_machine: - x86_64-apple-darwin13.4.0 numpy: -- '1.26' +- '2.0' openblas: - 0.3.* pin_run_as_build: diff --git a/.ci_support/osx_64_numpy1.22python3.9.____cpython.yaml b/.ci_support/osx_64_numpy2.0python3.9.____cpython.yaml similarity index 85% rename from .ci_support/osx_64_numpy1.22python3.9.____cpython.yaml rename to .ci_support/osx_64_numpy2.0python3.9.____cpython.yaml index 9e8599f..577223c 100644 --- a/.ci_support/osx_64_numpy1.22python3.9.____cpython.yaml +++ b/.ci_support/osx_64_numpy2.0python3.9.____cpython.yaml @@ -1,5 +1,7 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_compiler: - clang c_compiler_version: @@ -7,9 +9,9 @@ c_compiler_version: c_stdlib: - macosx_deployment_target c_stdlib_version: -- '10.9' +- '10.13' channel_sources: -- conda-forge +- conda-forge/label/numpy_rc,conda-forge channel_targets: - conda-forge main fortran_compiler: @@ -27,7 +29,7 @@ libuuid: macos_machine: - x86_64-apple-darwin13.4.0 numpy: -- '1.22' +- '2.0' openblas: - 0.3.* pin_run_as_build: diff --git a/.gitattributes b/.gitattributes index 7f32763..18f114a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -20,8 +20,8 @@ bld.bat text eol=crlf .travis.yml linguist-generated=true .scripts/* linguist-generated=true .woodpecker.yml linguist-generated=true -LICENSE.txt linguist-generated=true -README.md linguist-generated=true +/LICENSE.txt linguist-generated=true +/README.md linguist-generated=true azure-pipelines.yml linguist-generated=true build-locally.py linguist-generated=true shippable.yml linguist-generated=true diff --git a/README.md b/README.md index 3483870..4cc499a 100644 --- a/README.md +++ b/README.md @@ -32,80 +32,80 @@ Current build status
- + - - - - + - + - + - + - + + + + - + - + diff --git a/recipe/0001-Replace-function-deprecated-in-numpy-2.0.patch b/recipe/0001-Replace-function-deprecated-in-numpy-2.0.patch new file mode 100644 index 0000000..e57fd64 --- /dev/null +++ b/recipe/0001-Replace-function-deprecated-in-numpy-2.0.patch @@ -0,0 +1,25 @@ +From 2fa733a4d9cf8d5c55d5509b00a5f193473c1bbc Mon Sep 17 00:00:00 2001 +From: mauzey1 +Date: Wed, 29 May 2024 11:12:15 -0700 +Subject: [PATCH] Replace function deprecated in numpy 2.0 + +--- + setup.py.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py.in b/setup.py.in +index 745c9e9..4372c2c 100755 +--- a/setup.py.in ++++ b/setup.py.in +@@ -3,7 +3,7 @@ import numpy + import os + from setuptools import setup, Extension + +-include_dirs = [numpy.lib.utils.get_include(),"include","include/cdTime"] ++include_dirs = [numpy.get_include(),"include","include/cdTime"] + + library_dirs = [ os.path.join("@prefix@","lib") ,'.'] + include_dirs.append(os.path.join("@prefix@","include")) +-- +2.39.2 (Apple Git-143) + diff --git a/recipe/0002-Include-signal.h-to-support-sig_atomic_t.patch b/recipe/0002-Include-signal.h-to-support-sig_atomic_t.patch new file mode 100644 index 0000000..5a1bbb0 --- /dev/null +++ b/recipe/0002-Include-signal.h-to-support-sig_atomic_t.patch @@ -0,0 +1,22 @@ +From cf9c5c38b6896586568fc7e27db1bd222bd2b45a Mon Sep 17 00:00:00 2001 +From: mauzey1 +Date: Mon, 24 Jun 2024 11:28:05 -0700 +Subject: [PATCH 2/2] Include signal.h to support sig_atomic_t + +--- + Src/_cmormodule.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Src/_cmormodule.c b/Src/_cmormodule.c +index 744bb46..da1036a 100644 +--- a/Src/_cmormodule.c ++++ b/Src/_cmormodule.c +@@ -1,4 +1,5 @@ + #include ++#include + #define NPY_NO_DEPRECATED_API NPY_1_10_API_VERSION + + #include "numpy/arrayobject.h" +-- +2.39.2 (Apple Git-143) + diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 96212ce..8f8f548 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -7,14 +7,18 @@ package: source: url: https://github.com/PCMDI/cmor/archive/{{ version }}.tar.gz sha256: 5f5a44e660104916dd0a3d0d942234db375d2a4ffb4f4113ec88cfdd93f99ef4 + patches: + - 0001-Replace-function-deprecated-in-numpy-2.0.patch + - 0002-Include-signal.h-to-support-sig_atomic_t.patch build: - number: 0 + number: 1 skip: true # [win] requirements: build: - {{ compiler('c') }} + - {{ stdlib("c") }} - {{ compiler('fortran') }} - make # [unix] host: @@ -34,7 +38,6 @@ requirements: - python - libuuid - udunits2 - - {{ pin_compatible('numpy') }} - hdf5 - libnetcdf - netcdf4
VariantStatus
linux_64_numpy1.22python3.10.____cpython - - variant - -
linux_64_numpy1.22python3.8.____cpython - + variant
linux_64_numpy1.22python3.9.____cpythonlinux_64_numpy2.0python3.10.____cpython - - variant + + variant
linux_64_numpy1.23python3.11.____cpythonlinux_64_numpy2.0python3.11.____cpython - - variant + + variant
linux_64_numpy1.26python3.12.____cpythonlinux_64_numpy2.0python3.12.____cpython - - variant + + variant
osx_64_numpy1.22python3.10.____cpythonlinux_64_numpy2.0python3.9.____cpython - - variant + + variant
osx_64_numpy1.22python3.8.____cpython - + variant
osx_64_numpy1.22python3.9.____cpythonosx_64_numpy2.0python3.10.____cpython + + variant + +
osx_64_numpy2.0python3.11.____cpython - - variant + + variant
osx_64_numpy1.23python3.11.____cpythonosx_64_numpy2.0python3.12.____cpython - - variant + + variant
osx_64_numpy1.26python3.12.____cpythonosx_64_numpy2.0python3.9.____cpython - - variant + + variant