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

Drop Python 3.6, enable Apple Silicon wheels for Python 3.8, 3.9 and 3.10, upgrade to manylinux2014 #62

Merged
merged 16 commits into from
Aug 15, 2022

Conversation

MonkeyBreaker
Copy link
Collaborator

This PR provide wheels for the new Apple Silicon for Python 3.8, 3.9 and 3.10.
Unfortunately, for the moment the wheels can be generated but cannot be tested because Github Action runner do not have a native ARM runner for MacOS.

I did not find if a public statement will provide in a near future support for native ARM runners. But on the meantime we can already generate the wheels and anybody that has a Mac with the new Silicon can perform the test on his/her machine and let us if it works. And only then, we will upload the new wheels on Pypi.

Unfortunately I do not have this kind of machine available.

Of course another option would be to emulate the hardware, but, for the moment I do not have the time to deploy this kind of feature.

@CLAassistant
Copy link

CLAassistant commented Feb 6, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ ulupo
❌ MonkeyBreaker
You have signed the CLA already but the status is still pending? Let us recheck it.

@MonkeyBreaker
Copy link
Collaborator Author

The wheels are available here If anybody with latest Apple Silicon can download them and test them locally I will be more than glad :)

@ulupo
Copy link
Collaborator

ulupo commented Mar 3, 2022

The wheels are available here If anybody with latest Apple Silicon can download them and test them locally I will be more than glad :)

I can do this!

@ulupo
Copy link
Collaborator

ulupo commented Mar 21, 2022

@MonkeyBreaker I guess the wheels need to be re-generated since #56 was merged. I'm ready to test them once you've done so.

Signed-off-by: julian <monkeybreaker@protonmail.com>
@MonkeyBreaker
Copy link
Collaborator Author

@ulupo here just out of the oven :)

@ulupo
Copy link
Collaborator

ulupo commented Mar 23, 2022

I cannot even use the universal2 wheels on my machine. Opening the interpreter in the environment in which I have installed the wheels, I get:

>>> import gph
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ulupo/miniforge3/envs/test-gph-py38/lib/python3.8/site-packages/gph/__init__.py", line 1, in <module>
    from .python import ripser_parallel
  File "/Users/ulupo/miniforge3/envs/test-gph-py38/lib/python3.8/site-packages/gph/python/__init__.py", line 1, in <module>
    from .ripser_interface import ripser_parallel
  File "/Users/ulupo/miniforge3/envs/test-gph-py38/lib/python3.8/site-packages/gph/python/ripser_interface.py", line 32, in <module>
    from ..modules import gph_ripser, gph_ripser_coeff, gph_collapser
ImportError: dlopen(/Users/ulupo/miniforge3/envs/test-gph-py38/lib/python3.8/site-packages/gph/modules/gph_ripser.cpython-38-darwin.so, 0x0002): tried: '/Users/ulupo/miniforge3/envs/test-gph-py38/lib/python3.8/site-packages/gph/modules/gph_ripser.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))

env:
CIBW_BUILD: "cp310-*"
CIBW_SKIP: "*-win32 *-musllinux_x86_64 *_i686"
CIBW_BEFORE_BUILD: python -m pip install cmake
CIBW_TEST_COMMAND: python -m pytest {package}/gph/python/test
CIBW_TEST_REQUIRES: pytest hypothesis
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_ARCHS_MACOS: x86_64 universal2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this should be x86_64 arm64 universal2 to solve my issues?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this, re-generated the wheels, but still get the same error as before!

Could this be related? Unidata/netcdf4-python#1148 (comment)

ulupo and others added 10 commits March 24, 2022 08:39
Signed-off-by: julian <monkeybreaker@protonmail.com>
Signed-off-by: julian <monkeybreaker@protonmail.com>
Signed-off-by: julian <monkeybreaker@protonmail.com>
Signed-off-by: julian <monkeybreaker@protonmail.com>
Signed-off-by: julian <monkeybreaker@protonmail.com>
Signed-off-by: julian <monkeybreaker@protonmail.com>
Signed-off-by: julian <monkeybreaker@protonmail.com>
Signed-off-by: julian <monkeybreaker@protonmail.com>
@ulupo
Copy link
Collaborator

ulupo commented Aug 4, 2022

I'm happy to help complete work on this PR. As we discussed, Python 3.6 should be removed and we should adopt manylinux2014 for all python versions (now we only use it for Python 3.10). Perhaps Python 3.7 can now be covered too with macOS ARM wheels? I will then test the wheels on my M1 machine.

@MonkeyBreaker MonkeyBreaker linked an issue Aug 14, 2022 that may be closed by this pull request
Signed-off-by: julian <monkeybreaker@protonmail.com>
@MonkeyBreaker
Copy link
Collaborator Author

Support to Python 3.6 dropped

@ulupo ulupo changed the title Enable Apple Silicon wheels for Python version 3.8, 3.9 and 3.10 Drop Python 3.6, enable Apple Silicon wheels for Python 3.8, 3.9 and 3.10, upgrade to manylinux2014 Aug 14, 2022
ulupo added a commit that referenced this pull request Aug 14, 2022
* setup.py arm wheels

Signed-off-by: julian <monkeybreaker@protonmail.com>

* Clean setup.py and only build universal2 wheels

Signed-off-by: julian <monkeybreaker@protonmail.com>

* Drop support to Python 3.6

Signed-off-by: julian <monkeybreaker@protonmail.com>

* Add CI and wheels for Python 3.11, upgrade to manylinux2014 throughout

* Drop Python 3.11 from CI and wheels

Signed-off-by: julian <monkeybreaker@protonmail.com>
Co-authored-by: julian <monkeybreaker@protonmail.com>
Copy link
Collaborator

@ulupo ulupo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formally approved, but waiting for @MonkeyBreaker's last look!

Copy link
Collaborator Author

@MonkeyBreaker MonkeyBreaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ulupo ulupo merged commit 902148e into giotto-ai:main Aug 15, 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.

[CI] Produce wheels for Python 3.10 and Apple Silicon
3 participants