diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 102b02a..15c5551 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -23,6 +23,21 @@ jobs: osx_64_numpy2.0python3.9.____cpython: CONFIG: osx_64_numpy2.0python3.9.____cpython UPLOAD_PACKAGES: 'True' + osx_arm64_numpy1.22python3.8.____cpython: + CONFIG: osx_arm64_numpy1.22python3.8.____cpython + UPLOAD_PACKAGES: 'True' + osx_arm64_numpy2.0python3.10.____cpython: + CONFIG: osx_arm64_numpy2.0python3.10.____cpython + UPLOAD_PACKAGES: 'True' + osx_arm64_numpy2.0python3.11.____cpython: + CONFIG: osx_arm64_numpy2.0python3.11.____cpython + UPLOAD_PACKAGES: 'True' + osx_arm64_numpy2.0python3.12.____cpython: + CONFIG: osx_arm64_numpy2.0python3.12.____cpython + UPLOAD_PACKAGES: 'True' + osx_arm64_numpy2.0python3.9.____cpython: + CONFIG: osx_arm64_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 9c2c981..8abecf9 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/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main docker_image: diff --git a/.ci_support/linux_64_numpy2.0python3.10.____cpython.yaml b/.ci_support/linux_64_numpy2.0python3.10.____cpython.yaml index 2b6dd39..10a2acf 100644 --- a/.ci_support/linux_64_numpy2.0python3.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/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main docker_image: diff --git a/.ci_support/linux_64_numpy2.0python3.11.____cpython.yaml b/.ci_support/linux_64_numpy2.0python3.11.____cpython.yaml index e223b2d..eba3eea 100644 --- a/.ci_support/linux_64_numpy2.0python3.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/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main docker_image: diff --git a/.ci_support/linux_64_numpy2.0python3.12.____cpython.yaml b/.ci_support/linux_64_numpy2.0python3.12.____cpython.yaml index e7390b1..1db8f0d 100644 --- a/.ci_support/linux_64_numpy2.0python3.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/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main docker_image: diff --git a/.ci_support/linux_64_numpy2.0python3.9.____cpython.yaml b/.ci_support/linux_64_numpy2.0python3.9.____cpython.yaml index 09d29c8..07a7fd8 100644 --- a/.ci_support/linux_64_numpy2.0python3.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/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main docker_image: diff --git a/.ci_support/osx_64_numpy1.22python3.8.____cpython.yaml b/.ci_support/osx_64_numpy1.22python3.8.____cpython.yaml index ff4becb..85bdcb6 100644 --- a/.ci_support/osx_64_numpy1.22python3.8.____cpython.yaml +++ b/.ci_support/osx_64_numpy1.22python3.8.____cpython.yaml @@ -11,7 +11,7 @@ c_stdlib: c_stdlib_version: - '10.13' channel_sources: -- conda-forge/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main fortran_compiler: diff --git a/.ci_support/osx_64_numpy2.0python3.10.____cpython.yaml b/.ci_support/osx_64_numpy2.0python3.10.____cpython.yaml index b0ca4c3..39c9328 100644 --- a/.ci_support/osx_64_numpy2.0python3.10.____cpython.yaml +++ b/.ci_support/osx_64_numpy2.0python3.10.____cpython.yaml @@ -11,7 +11,7 @@ c_stdlib: c_stdlib_version: - '10.13' channel_sources: -- conda-forge/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main fortran_compiler: diff --git a/.ci_support/osx_64_numpy2.0python3.11.____cpython.yaml b/.ci_support/osx_64_numpy2.0python3.11.____cpython.yaml index 0125f8b..dda191c 100644 --- a/.ci_support/osx_64_numpy2.0python3.11.____cpython.yaml +++ b/.ci_support/osx_64_numpy2.0python3.11.____cpython.yaml @@ -11,7 +11,7 @@ c_stdlib: c_stdlib_version: - '10.13' channel_sources: -- conda-forge/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main fortran_compiler: diff --git a/.ci_support/osx_64_numpy2.0python3.12.____cpython.yaml b/.ci_support/osx_64_numpy2.0python3.12.____cpython.yaml index b9bcc8f..2b1d89a 100644 --- a/.ci_support/osx_64_numpy2.0python3.12.____cpython.yaml +++ b/.ci_support/osx_64_numpy2.0python3.12.____cpython.yaml @@ -11,7 +11,7 @@ c_stdlib: c_stdlib_version: - '10.13' channel_sources: -- conda-forge/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main fortran_compiler: diff --git a/.ci_support/osx_64_numpy2.0python3.9.____cpython.yaml b/.ci_support/osx_64_numpy2.0python3.9.____cpython.yaml index 577223c..cde9628 100644 --- a/.ci_support/osx_64_numpy2.0python3.9.____cpython.yaml +++ b/.ci_support/osx_64_numpy2.0python3.9.____cpython.yaml @@ -11,7 +11,7 @@ c_stdlib: c_stdlib_version: - '10.13' channel_sources: -- conda-forge/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main fortran_compiler: diff --git a/.ci_support/osx_arm64_numpy1.22python3.8.____cpython.yaml b/.ci_support/osx_arm64_numpy1.22python3.8.____cpython.yaml new file mode 100644 index 0000000..1443660 --- /dev/null +++ b/.ci_support/osx_arm64_numpy1.22python3.8.____cpython.yaml @@ -0,0 +1,47 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' +c_compiler: +- clang +c_compiler_version: +- '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '11.0' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +fortran_compiler: +- gfortran +fortran_compiler_version: +- '12' +hdf5: +- 1.14.3 +json_c: +- '0.17' +libnetcdf: +- 4.9.2 +libuuid: +- '2' +macos_machine: +- arm64-apple-darwin20.0.0 +numpy: +- '1.22' +openblas: +- 0.3.* +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.8.* *_cpython +target_platform: +- osx-arm64 +zip_keys: +- - c_compiler_version + - fortran_compiler_version +- - python + - numpy diff --git a/.ci_support/osx_arm64_numpy2.0python3.10.____cpython.yaml b/.ci_support/osx_arm64_numpy2.0python3.10.____cpython.yaml new file mode 100644 index 0000000..aaf7f88 --- /dev/null +++ b/.ci_support/osx_arm64_numpy2.0python3.10.____cpython.yaml @@ -0,0 +1,47 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' +c_compiler: +- clang +c_compiler_version: +- '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '11.0' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +fortran_compiler: +- gfortran +fortran_compiler_version: +- '12' +hdf5: +- 1.14.3 +json_c: +- '0.17' +libnetcdf: +- 4.9.2 +libuuid: +- '2' +macos_machine: +- arm64-apple-darwin20.0.0 +numpy: +- '2.0' +openblas: +- 0.3.* +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.10.* *_cpython +target_platform: +- osx-arm64 +zip_keys: +- - c_compiler_version + - fortran_compiler_version +- - python + - numpy diff --git a/.ci_support/osx_arm64_numpy2.0python3.11.____cpython.yaml b/.ci_support/osx_arm64_numpy2.0python3.11.____cpython.yaml new file mode 100644 index 0000000..1500c18 --- /dev/null +++ b/.ci_support/osx_arm64_numpy2.0python3.11.____cpython.yaml @@ -0,0 +1,47 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' +c_compiler: +- clang +c_compiler_version: +- '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '11.0' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +fortran_compiler: +- gfortran +fortran_compiler_version: +- '12' +hdf5: +- 1.14.3 +json_c: +- '0.17' +libnetcdf: +- 4.9.2 +libuuid: +- '2' +macos_machine: +- arm64-apple-darwin20.0.0 +numpy: +- '2.0' +openblas: +- 0.3.* +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.11.* *_cpython +target_platform: +- osx-arm64 +zip_keys: +- - c_compiler_version + - fortran_compiler_version +- - python + - numpy diff --git a/.ci_support/osx_arm64_numpy2.0python3.12.____cpython.yaml b/.ci_support/osx_arm64_numpy2.0python3.12.____cpython.yaml new file mode 100644 index 0000000..83abf9b --- /dev/null +++ b/.ci_support/osx_arm64_numpy2.0python3.12.____cpython.yaml @@ -0,0 +1,47 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' +c_compiler: +- clang +c_compiler_version: +- '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '11.0' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +fortran_compiler: +- gfortran +fortran_compiler_version: +- '12' +hdf5: +- 1.14.3 +json_c: +- '0.17' +libnetcdf: +- 4.9.2 +libuuid: +- '2' +macos_machine: +- arm64-apple-darwin20.0.0 +numpy: +- '2.0' +openblas: +- 0.3.* +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.12.* *_cpython +target_platform: +- osx-arm64 +zip_keys: +- - c_compiler_version + - fortran_compiler_version +- - python + - numpy diff --git a/.ci_support/osx_arm64_numpy2.0python3.9.____cpython.yaml b/.ci_support/osx_arm64_numpy2.0python3.9.____cpython.yaml new file mode 100644 index 0000000..7de2046 --- /dev/null +++ b/.ci_support/osx_arm64_numpy2.0python3.9.____cpython.yaml @@ -0,0 +1,47 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' +c_compiler: +- clang +c_compiler_version: +- '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '11.0' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +fortran_compiler: +- gfortran +fortran_compiler_version: +- '12' +hdf5: +- 1.14.3 +json_c: +- '0.17' +libnetcdf: +- 4.9.2 +libuuid: +- '2' +macos_machine: +- arm64-apple-darwin20.0.0 +numpy: +- '2.0' +openblas: +- 0.3.* +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.9.* *_cpython +target_platform: +- osx-arm64 +zip_keys: +- - c_compiler_version + - fortran_compiler_version +- - python + - numpy diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 2f3df6c..a5836e8 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -46,6 +46,9 @@ source run_conda_forge_build_setup # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" +if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]] && [[ "${HOST_PLATFORM}" != linux-* ]] && [[ "${BUILD_WITH_CONDA_DEBUG:-0}" != 1 ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" +fi ( endgroup "Configuring conda" ) 2> /dev/null @@ -69,6 +72,13 @@ else --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" + + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 165fa51..ba0c879 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -77,10 +77,21 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then /bin/bash else + if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" + fi + conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" + + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/README.md b/README.md index 4cc499a..f170208 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Current build status
- + @@ -41,73 +41,108 @@ Current build status linux_64_numpy1.22python3.8.____cpython - + variant linux_64_numpy2.0python3.10.____cpython - + variant linux_64_numpy2.0python3.11.____cpython - + variant linux_64_numpy2.0python3.12.____cpython - + variant linux_64_numpy2.0python3.9.____cpython - + variant osx_64_numpy1.22python3.8.____cpython - + variant osx_64_numpy2.0python3.10.____cpython - + variant osx_64_numpy2.0python3.11.____cpython - + variant osx_64_numpy2.0python3.12.____cpython - + variant osx_64_numpy2.0python3.9.____cpython - + variant + + osx_arm64_numpy1.22python3.8.____cpython + + + variant + + + + osx_arm64_numpy2.0python3.10.____cpython + + + variant + + + + osx_arm64_numpy2.0python3.11.____cpython + + + variant + + + + osx_arm64_numpy2.0python3.12.____cpython + + + variant + + + + osx_arm64_numpy2.0python3.9.____cpython + + + variant + + diff --git a/conda-forge.yml b/conda-forge.yml index 2f501ce..72cf770 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,4 +1,7 @@ conda_forge_output_validation: true +build_platform: + osx_arm64: osx_64 +test: native_and_emulated github: branch_name: main tooling_branch_name: main diff --git a/recipe/0001-Replace-AC_CHECK_FILE-with-test-f-configure.ac-to-en.patch b/recipe/0001-Replace-AC_CHECK_FILE-with-test-f-configure.ac-to-en.patch new file mode 100644 index 0000000..d065311 --- /dev/null +++ b/recipe/0001-Replace-AC_CHECK_FILE-with-test-f-configure.ac-to-en.patch @@ -0,0 +1,35 @@ +From 76bee6a2acd2cce9b547d7a1dca497ea7174978f Mon Sep 17 00:00:00 2001 +From: mauzey1 +Date: Tue, 25 Jun 2024 12:00:57 -0700 +Subject: [PATCH] Replace AC_CHECK_FILE with 'test -f' configure.ac to enable + cross-compilation + +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c9d15c9..e426a7c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -212,7 +212,7 @@ LIBS="" + AC_ARG_WITH([udunits2],[AS_HELP_STRING([--with-udunits2],[enable support for udunits2 in none standard location])],[],[with_udunits2="no"]) + if [ test x${with_udunits2} != xyes ] ; then + if [ test x${with_udunits2} != xno ] ; then +- AC_CHECK_FILE(${with_udunits2}/include/udunits2/udunits2.h, ++ AS_IF([test -f "${with_udunits2}/include/udunits2/udunits2.h"], + [UDUNITS2FLAGS=" -I${with_udunits2}/include/udunits2"], + [UDUNITS2FLAGS=" -I${with_udunits2}/include"]) + if [ test ${RTAG} != "none" ] ; then +@@ -235,7 +235,7 @@ LIBS="" + AC_ARG_WITH([netcdf],[AS_HELP_STRING([--with-netcdf],[enable support for NetCDF in none standard location])],[],[with_netcdf="no"]) + if [ test x${with_netcdf} != xyes ]; then + if [ test x${with_netcdf} != xno ] ; then +- AC_CHECK_FILE([${with_netcdf}/bin/nc-config],[HAS_NCCONFIG=yes],[HAS_NCCONFIG=no]) ++ AS_IF([test -f "${with_netcdf}/bin/nc-config"],[HAS_NCCONFIG=yes],[HAS_NCCONFIG=no]) + if [ test ${HAS_NCCONFIG} == "yes" ] ; then + NCCFLAGS=`${with_netcdf}/bin/nc-config --cflags` + NCLDFLAGS=`${with_netcdf}/bin/nc-config --libs` +-- +2.39.2 (Apple Git-143) + diff --git a/recipe/build.sh b/recipe/build.sh index 4568cd3..2520463 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -4,6 +4,11 @@ else export LDSHARED_FLAGS="-bundle -undefined dynamic_lookup" fi +# Get an updated config.sub and config.guess +cp $BUILD_PREFIX/share/gnuconfig/config.* . + +autoconf + ./configure \ --with-python=${PREFIX} \ --with-uuid=${PREFIX} \ diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8f8f548..1b2e8ed 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,9 +10,10 @@ source: patches: - 0001-Replace-function-deprecated-in-numpy-2.0.patch - 0002-Include-signal.h-to-support-sig_atomic_t.patch + - 0001-Replace-AC_CHECK_FILE-with-test-f-configure.ac-to-en.patch build: - number: 1 + number: 2 skip: true # [win] requirements: @@ -20,6 +21,11 @@ requirements: - {{ compiler('c') }} - {{ stdlib("c") }} - {{ compiler('fortran') }} + - python # [build_platform != target_platform] + - numpy # [build_platform != target_platform] + - cross-python_{{ target_platform }} # [build_platform != target_platform] + - autoconf # [unix] + - gnuconfig # [unix] - make # [unix] host: - python