scipy icon indicating copy to clipboard operation
scipy copied to clipboard

BLD/REL: on Windows use numpy 1.22.3 as the version to build wheels against

Open rgommers opened this issue 3 years ago • 3 comments
trafficstars

Closes gh-16787

[ci skip]

Please don't merge yet, I still need to test on the oldest-supported-numpy repo, which has CI for these conditions

rgommers avatar Aug 06 '22 10:08 rgommers

I'll try running 1.22.3 on the cibw branch

andyfaff avatar Aug 06 '22 12:08 andyfaff

The cibuildwheel works for 0

andyfaff avatar Aug 07 '22 01:08 andyfaff

Oops, accidentally closed on by fat fingers on my phone. 1.22.3 looks good for Python 3.10 on windows amd64

andyfaff avatar Aug 07 '22 01:08 andyfaff

I tested this now (and found a bug) - it should be good to go now. Also added Python 3.11 update now that numpy has 3.11 wheels on PyPI.

The second commit here needs backporting, the first one not.

rgommers avatar Aug 16 '22 03:08 rgommers

Aargh, I think it needs to be 1.22.3 for win_amd64 as well, not just win32.

andyfaff avatar Aug 16 '22 10:08 andyfaff

No, win32 is the specifier for both platforms. And yes, that can be problematic - but we should be fine here.

rgommers avatar Aug 16 '22 10:08 rgommers

https://github.com/scipy/scipy/runs/7854253531?check_suite_focus=true shows that the win_amd64 DLL aren't importable on 3.10 with this version, 1.22.3 works.

andyfaff avatar Aug 16 '22 10:08 andyfaff

Hmm yes, that does still select: Collecting numpy==1.21.6. It looks like the specifier should/may be 'Windows', not 'win32' (at least according to the test in oldest-supported-numpy). According to https://peps.python.org/pep-0345/#environment-markers it is win32, but the mistake in this PR is that it uses platform_machine rather than platform_system.

Maybe easier to iterate in your cibuildhweel PR, before trying here again? Can you try platform_system=='win32' or else platform_system=='Windows'?

rgommers avatar Aug 16 '22 11:08 rgommers

https://github.com/scipy/scipy/pull/16842/commits/c8047d926d9c819aae3734854ad7bdb8f2a830de#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R41

"numpy==1.22.3; python_version=='3.10' and platform_system=='Windows' and platform_python_implementation != 'PyPy'"

seems to work. i.e. platform_machine-->platform_system

andyfaff avatar Aug 17 '22 00:08 andyfaff

This fix was included in the cibuildwheel PR (gh-16842)

rgommers avatar Aug 23 '22 14:08 rgommers