Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: better cross-platform auto archs #1266

Merged
merged 2 commits into from Sep 25, 2022

Conversation

henryiii
Copy link
Contributor

@henryiii henryiii commented Sep 13, 2022

This improves the default arch selection when targeting a different platform.

If you run cibuildwheel --platform linux --print-build-identifiers from 64-bit Windows, I'd expect to see the identifiers for 64/32-bit Linux. I noticed this because I ran cibuildwheel --platform windows --print-build-identifiers from macOS, and got nothing - I expected the 64/32-bit Windows identifiers. However, this does work if you run macos from linux, or vs. versa, as long as you are on Intel, due to a quirk of the names.

I've just fixed the auto arch discovery to be based on the target platforms's matching architecture. auto now uses the target OS instead of the current OS to compute the auto architectures.

(This also happens to be a bit nicer for #1261. It also should be much nicer when using --platform linux to do builds with Docker from Windows!)

@henryiii henryiii force-pushed the henryiii/fix/crossplatform branch 2 times, most recently from 3309748 to acf46ed Compare September 13, 2022 03:31
This improves the default arch selection when targetting a different platform.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@ddelange
Copy link

@joerick I wanted to give the 'advanced parallelization' setup from #1261 a try when I ran into this limitation. Any chance this PR could get a merge&release? Many thanks!

@ddelange
Copy link

ddelange commented Sep 20, 2022

fwiw

in ddelange/asyncpg#2

and before this change it was fine: https://github.com/ddelange/asyncpg/actions/runs/3072698535/jobs/4964355341#step:4:89

maybe it's an issue with the --only flag?

on my mac:

$ cibuildwheel --print-build-identifiers --platform windows --arch x86,AMD64
cp36-win32
cp36-win_amd64
cp37-win32
cp37-win_amd64
cp38-win32
cp38-win_amd64
cp39-win32
cp39-win_amd64
cp310-win32
cp310-win_amd64
cp311-win32
cp311-win_amd64
pp37-win_amd64
pp38-win_amd64
pp39-win_amd64

@joerick
Copy link
Contributor

joerick commented Sep 24, 2022

@ddelange that looks to be an issue with the --only flag. I've raised a separate issue.

@joerick
Copy link
Contributor

joerick commented Sep 24, 2022

@henryiii I refactored this a little, I was a bit confused with the names of variables. Hopefully this will make sense to both of us!

@henryiii
Copy link
Contributor Author

Okay, LGTM, miming changes is fine.

@joerick joerick merged commit 73a435b into pypa:main Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants