From c90f83b52a36bbfd5accf870c274d1bff9c93db1 Mon Sep 17 00:00:00 2001 From: "Billy K. Poon" Date: Mon, 15 Jul 2024 11:08:07 -0700 Subject: [PATCH 1/3] Add another patch for numpy 2.0 --- recipe/meta.yaml | 6 ++-- recipe/patches/0004-Support-numpy-2.0.patch | 38 +++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 recipe/patches/0004-Support-numpy-2.0.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 90e1715..caf7125 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -24,15 +24,17 @@ source: url: https://boostorg.jfrog.io/artifactory/main/release/{{ version }}/source/boost_{{ version|replace(".", "_") }}.tar.bz2 sha256: cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454 patches: - # ensure our compiler flags get used during bootstrapping + # ensure our compiler flags get used during bootstrapping - patches/0001-Add-default-value-for-cxx-and-cxxflags-options-for-t.patch # backport https://github.com/boostorg/locale/pull/212 - patches/0002-Reimplement-string_set-as-any_string.patch # backport https://github.com/boostorg/python/pull/432 - patches/0003-Support-numpy-2.0.0b1.patch + # backport https://github.com/boostorg/python/pull/443 + - patches/0004-Support-numpy-2.0.patch build: - number: 3 + number: 4 script_env: - PY_DUMMY_VER={{ PY_DUMMY_VER }} - NP_DUMMY_VER={{ NP_DUMMY_VER }} diff --git a/recipe/patches/0004-Support-numpy-2.0.patch b/recipe/patches/0004-Support-numpy-2.0.patch new file mode 100644 index 0000000..377374e --- /dev/null +++ b/recipe/patches/0004-Support-numpy-2.0.patch @@ -0,0 +1,38 @@ +diff --git a/libs/python/src/numpy/dtype.cpp b/libs/python/src/numpy/dtype.cpp +index da30d192..1ce8c6ec 100644 +--- a/libs/python/src/numpy/dtype.cpp ++++ b/libs/python/src/numpy/dtype.cpp +@@ -107,32 +107,7 @@ int dtype::get_itemsize() const { + } + + bool equivalent(dtype const & a, dtype const & b) { +- // On Windows x64, the behaviour described on +- // http://docs.scipy.org/doc/numpy/reference/c-api.array.html for +- // PyArray_EquivTypes unfortunately does not extend as expected: +- // "For example, on 32-bit platforms, NPY_LONG and NPY_INT are equivalent". +- // This should also hold for 64-bit platforms (and does on Linux), but not +- // on Windows. Implement an alternative: +-#ifdef _MSC_VER +- if (sizeof(long) == sizeof(int) && +- // Manually take care of the type equivalence. +- ((a == dtype::get_builtin() || a == dtype::get_builtin()) && +- (b == dtype::get_builtin() || b == dtype::get_builtin()) || +- (a == dtype::get_builtin() || a == dtype::get_builtin()) && +- (b == dtype::get_builtin() || b == dtype::get_builtin()))) { +- return true; +- } else { +- return PyArray_EquivTypes( +- reinterpret_cast(a.ptr()), +- reinterpret_cast(b.ptr()) +- ); +- } +-#else +- return PyArray_EquivTypes( +- reinterpret_cast(a.ptr()), +- reinterpret_cast(b.ptr()) +- ); +-#endif ++ return a == b; + } + + namespace From 9627a7620393fd31934829aea05bad8c0fffd6e2 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 00:14:17 +0000 Subject: [PATCH 2/3] MNT: Re-rendered with conda-build 24.5.1, conda-smithy 3.37.0, and conda-forge-pinning 2024.07.16.17.39.45 --- .ci_support/linux_64_.yaml | 8 ++++---- .ci_support/linux_aarch64_.yaml | 4 ++-- .ci_support/linux_ppc64le_.yaml | 4 ++-- .ci_support/osx_64_.yaml | 6 ++++-- .ci_support/osx_arm64_.yaml | 6 ++++-- .ci_support/win_64_.yaml | 4 ++-- .gitattributes | 4 ++-- .scripts/build_steps.sh | 6 ++++++ .scripts/run_osx_build.sh | 7 +++++++ .scripts/run_win_build.bat | 5 +++++ 10 files changed, 38 insertions(+), 16 deletions(-) diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 6644821..fe5b758 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -3,11 +3,11 @@ bzip2: c_stdlib: - sysroot c_stdlib_version: -- '2.12' +- '2.17' cdt_name: -- cos6 +- cos7 channel_sources: -- conda-forge/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main cxx_compiler: @@ -54,6 +54,6 @@ zip_keys: - numpy - python_impl zlib: -- '1.2' +- '1' zstd: - '1.5' diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index 968bd14..a0b7af0 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -11,7 +11,7 @@ cdt_arch: cdt_name: - cos7 channel_sources: -- conda-forge/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main cxx_compiler: @@ -58,6 +58,6 @@ zip_keys: - numpy - python_impl zlib: -- '1.2' +- '1' zstd: - '1.5' diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index d94f46b..0297a3f 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -7,7 +7,7 @@ c_stdlib_version: cdt_name: - cos7 channel_sources: -- conda-forge/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main cxx_compiler: @@ -54,6 +54,6 @@ zip_keys: - numpy - python_impl zlib: -- '1.2' +- '1' zstd: - '1.5' diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index b6e4ed4..e7e616e 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -1,5 +1,7 @@ MACOSX_DEPLOYMENT_TARGET: - '10.13' +MACOSX_SDK_VERSION: +- '10.13' bzip2: - '1' c_stdlib: @@ -7,7 +9,7 @@ c_stdlib: c_stdlib_version: - '10.13' channel_sources: -- conda-forge/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main cxx_compiler: @@ -52,6 +54,6 @@ zip_keys: - numpy - python_impl zlib: -- '1.2' +- '1' zstd: - '1.5' diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 653c9bd..0b66788 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -1,5 +1,7 @@ MACOSX_DEPLOYMENT_TARGET: - '11.0' +MACOSX_SDK_VERSION: +- '11.0' bzip2: - '1' c_stdlib: @@ -7,7 +9,7 @@ c_stdlib: c_stdlib_version: - '11.0' channel_sources: -- conda-forge/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main cxx_compiler: @@ -49,6 +51,6 @@ zip_keys: - numpy - python_impl zlib: -- '1.2' +- '1' zstd: - '1.5' diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index a08f972..21f1a4c 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -3,7 +3,7 @@ bzip2: c_stdlib: - vs channel_sources: -- conda-forge/label/numpy_rc,conda-forge +- conda-forge channel_targets: - conda-forge main cxx_compiler: @@ -44,6 +44,6 @@ zip_keys: - numpy - python_impl zlib: -- '1.2' +- '1' zstd: - '1.5' 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/.scripts/build_steps.sh b/.scripts/build_steps.sh index 899ba03..ba4b251 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -72,6 +72,12 @@ 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 07dff21..ba0c879 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -85,6 +85,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_win_build.bat b/.scripts/run_win_build.bat index 6d54697..65650bf 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -58,6 +58,11 @@ echo Building recipe conda-build.exe "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% if !errorlevel! neq 0 exit /b !errorlevel! +call :start_group "Inspecting artifacts" +:: inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 +WHERE inspect_artifacts >nul 2>nul && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" +call :end_group + :: Prepare some environment variables for the upload step if /i "%CI%" == "github_actions" ( set "FEEDSTOCK_NAME=%GITHUB_REPOSITORY:*/=%" From 5f3c3685ead13e1be66ec3b0e53bd16603bd8928 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 23 Jul 2024 19:08:07 -0700 Subject: [PATCH 3/3] Bump `build/number` to `5` Co-authored-by: h-vetinari --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index caf7125..aeaf1cd 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -34,7 +34,7 @@ source: - patches/0004-Support-numpy-2.0.patch build: - number: 4 + number: 5 script_env: - PY_DUMMY_VER={{ PY_DUMMY_VER }} - NP_DUMMY_VER={{ NP_DUMMY_VER }}