playwright-python icon indicating copy to clipboard operation
playwright-python copied to clipboard

add osx-arm64 variant config file

Open wolfv opened this issue 2 years ago • 7 comments

I didn't have a chance to test this yet -- any idea on how to test this easily?

wolfv avatar Mar 21 '23 08:03 wolfv

I think no way to test it easily, but we release a new Playwright version shortly, so we can then see if it works!

mxschmitt avatar Mar 21 '23 08:03 mxschmitt

We have build workflows configured, you. could try to add it there as well: https://github.com/microsoft/playwright-python/blob/890af94d3380c6dfbe9fabeaedea6b92aa232b11/.github/workflows/ci.yml#L188-L207

Can you actually publish Apple Silicon from an amd mac?

mxschmitt avatar Mar 21 '23 08:03 mxschmitt

Does the pip setup.py download any binaries from the internet? We might have to tell it to grab the appropriate ones for osx-arm64 as otherwise it migth think that it's still on osx-64.

All the osx-arm64 packages on conda-forge are built by cross-compiling so it should work fine from the "conda-side".

wolfv avatar Mar 21 '23 13:03 wolfv

Just FYI cross compiling with conda-build works by putting the dependencies for the build platforms (osx-64) that need to run during build in the build section of the recipe, and the ones that are linked against in the host section (that section will use packages from the osx-arm64 architecture.

wolfv avatar Mar 21 '23 13:03 wolfv

Does the pip setup.py download any binaries from the internet?

Yes it does.

By default it builds wheels containing the driver for the current platform/architecture. See here. You can pass --all and then it builds all the wheels. I think as of today the issue is that it builds only the current platform/arch by default, so we require conda to run on this specific arch to be able to get the corresponding wheel while publishing the conda package.

We might have to tell it to grab the appropriate ones for osx-arm64 as otherwise it might think that it's still on osx-64.

Yes I think thats what we need to do. And then tell conda to invoke setup.py per platform.

mxschmitt avatar Mar 22 '23 09:03 mxschmitt

Closing as per above. If anyone wants to revisit this in the future, feel free to create a new PR, thanks!

mxschmitt avatar Nov 13 '23 14:11 mxschmitt

Actually let me re-open, things have changed, GitHub now has M1 runners, do you mind adding this to the matrix? Then it should work I believe: https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/

mxschmitt avatar Nov 13 '23 14:11 mxschmitt

Landed in https://github.com/microsoft/playwright-python/issues/1745.

mxschmitt avatar Apr 02 '24 17:04 mxschmitt

This should be fixed as part of v1.43.0

mxschmitt avatar Apr 09 '24 10:04 mxschmitt

Thanks!

wolfv avatar Apr 09 '24 10:04 wolfv