boostorg / python

Boost.org python module
http://boostorg.github.io/python
Boost Software License 1.0
468 stars 201 forks source link

Update Libs/python hash to support numpy 2.0 #446

Open NEIL-smtg opened 1 month ago

NEIL-smtg commented 1 month ago

I work on MSVC compiler testing, and we regularly build popular open-source project including Boost, with development builds of MSVC in order to find and fix regressions before they ship and cause problems for you.

Recently Boost encountered error when building with MSVC under the c++latest mode:

C:\boost\libs\python\src\numpy\dtype.cpp(101): error C2039: 'elsize': is not a member of '_PyArray_Descr'
C:\Python312\Lib\site-packages\numpy\_core\include\numpy\ndarraytypes.h(618): note: see declaration of '_PyArray_Descr'

I believe that this issue is because python @ 47d5bc7 does not have support for numpy version >= 2.0, but recently they have committed a fix for this issue. Any chance you guys can update the hash of libs/python?

Steps to reproduce:

  1. Open command prompt
  2. git clone https://github.com/boostorg/boost.git
  3. cd boost
  4. git submodule sync
  5. git submodule foreach git reset --hard
  6. set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64 & set CL = /std:c++latest /D_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING /DBOOST_TIMER_ENABLE_DEPRECATED /wd4996 /bigobj /D_HAS_DEPRECATED_ADAPTOR_TYPEDEFS=1 /D_HAS_AUTO_PTR_ETC=1 /D_HAS_DEPRECATED_RAW_STORAGE_ITERATOR=1 /D_HAS_DEPRECATED_TEMPORARY_BUFFER=1 /D_HAS_DEPRECATED_NEGATORS=1 /Zc:enumTypes /Zc:equalityRewrite-
  7. .\bootstrap 2>&1
  8. .\b2 headers variant=release --build-dir=C:\gitP\boostorg\boost\amd64 address-model=64 architecture=x86 2>&1
  9. .\b2 variant=release --build-dir=C:\gitP\boostorg\boost\amd64 address-model=64 architecture=x86 2>&1

Log: Build.log OS: Windows

BwL1289 commented 1 month ago

Also experiencing on Linux

h-vetinari commented 1 month ago

It's pointless to move this from boostorg/boost to boostorg/python. This issue was fixed in the latter, but the submodule in the main repo wasn't updated yet.