10000 CI Set MACOSX_DEPLOYMENT_TARGET=10.9 for Wheels by OBgoneSouth · Pull Request #6750 · scikit-image/scikit-image · GitHub
[go: up one dir, main page]

Skip to content

CI Set MACOSX_DEPLOYMENT_TARGET=10.9 for Wheels #6750

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

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

OBgoneSouth
Copy link
Contributor

Change CI MACOSX_DEPLOYMENT_TARGET from 10.13 to 10.9 to allow for continued compatibility with earlier MacOS versions given that associated projects also have wheels available which meet the dependency version requirements.

Description

Would close issue #6461

Hopefully this is what @stefanv meant - I'd like to make a useful contribution but don't really know if I've got this right.

A wheel build of scikit-image 0.20rc5 on OS X 10.11 under Python 3.10 succeeds locally via Meson and passes the test suite with:

numpy 1.24.2
SciPy 1.9.3
networkx 3.0
pillow 9.2.0
imageio 2.25.0
tifffile 2023.2.3
PyWavelets 1.4.1
packaging 21.3
lazy_loader 0.1

Checklist

=============================== warnings summary ===============================
segmentation/tests/test_watershed.py::TestWatershed::test_watershed09
  /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/scipy/ndimage/_measurements.py:1527: DeprecationWarning: `np.int0` is a deprecated alias for `np.intp`.  (Deprecated NumPy 1.24)
    integral_types = [numpy.int0,

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========== 8024 passed, 25 skipped, 1 warning in 365.35s (0:06:05) ============
Premature end of JPEG file
Bogus Huffman table definition

For reviewers

  • Check that the PR title is short, concise, and will make sense 1 year
    later.
  • Check that new functions are imported in corresponding __init__.py.
  • Check that new features, API changes, and deprecations are mentioned in
    doc/release/release_dev.rst.
  • There is a bot to help automate backporting a PR to an older branch. For
    example, to backport to v0.19.x after merging, add the following in a PR
    comment: @meeseeksdev backport to v0.19.x
  • To run benchmarks on a PR, add the run-benchmark label. To rerun, the label
    can be removed and then added again. The benchmark output can be checked in
    the "Actions" tab.

@jarrodmillman
Copy link
Contributor

MacOS 10.9 has been "Unsupported as of September 2016" by Apple. Apple is a highly profitable company with tons of resources and a large developer team. They decided to drop support for 10.0 in 2016. I think it is worth considering whether a poorly funded, largely volunteer effort should support things an extremely profitable company making massive profits doesn't think makes financial sense.

That said if this works and wouldn't involve any bug fixes or support burden going forward, maybe we should consider it. Of course, it would require another release candidate and would delay the first version of scikit-image that supports Python 3.11 for a few more days.

If supporting older (unmaintained) versions of MacOS has no chance of generating additional bug reports or maintenance costs, then it may be worth delaying releasing a version of scikit-image that supports Python 3.11 for a few more days.

For comparison, 10.13 has been "Unsupported as of November 2020" by a record profit-making company and we are already supporting it as a largely volunteer effort.

@OBgoneSouth
Copy link
Contributor Author

That said if this works and wouldn't involve any bug fixes or support burden going forward, maybe we should consider it. Of course, it would require another release candidate and would delay the first version of scikit-image that supports Python 3.11 for a few more days.

If supporting older (unmaintained) versions of MacOS has no chance of generating additional bug reports or maintenance costs, then it may be worth delaying releasing a version of scikit-image that supports Python 3.11 for a few more days.

Perhaps I got the wrong end of the stick and this should have only been for 0.19.3

I can't get that version to build from source on El Capitan, but am already very happy that the change to Meson means that 0.20 does. So it's no big deal. Thank you very much already for that :)

There is certainly no guarantee that this wouldn't be more trouble than it's worth and is possibly not what was intended at all: in which case, apologies.

@jarrodmillman
Copy link
Contributor

@jarrodmillman
Copy link
Contributor
jarrodmillman commented Feb 14, 2023

This PR passes the tests and the wheels build. But it only builds Python 3.8 with support for the OSX 10.9 target. EDIT: Sorry, I am mistaken. This doesn't do anything as the variable is being ignored and we get this:
scikit_image-0.20.0rc6.dev0-cp38-cp38-macosx_10_16_x86_64.whl

(In other words, this PR doesn't change what wheels are built. We still need to get the wheel build system working and once that happens we can consider what versions we can support with this release. It is unlikely that there will be updates to the 0.19.x branch unless someone volunteers to sort that out.)

Python 3.8 is old and we will drop support for it according to NEP 29 in early April. So I am +1 for merging this and releasing another RC today or early tomorrow.

@jarrodmillman jarrodmillman added this to the 0.20 milestone Feb 14, 2023
@stefanv
Copy link
Member
stefanv commented Feb 14, 2023

@jarrodmillman Something's wrong with the x86 wheel builds: they should not be targeting macosx 12.

@OBgoneSouth
Copy link
Contributor Author

This doesn't do anything as the variable is being ignored and we get this:
scikit_image-0.20.0rc6.dev0-cp38-cp38-macosx_10_16_x86_64.whl

I don't know why it's being ignored (especially if MACOSX_DEPLOYMENT_TARGET=10.13 is respected) but the 10.16 tag means MacOS 11 Big Sur: so maybe not totally ignored, in that something other than a Monterey wheel is being built in the case of Python 3.8 (only). MacOS 11 reports itself as 10.16 if SYSTEM_VERSION_COMPAT=1 is set in the calling environment, for compatibility with scripts that assume OS "X" means 10.

https://twitter.com/jeremyhu/status/1285230460402987008?s=20

So maybe something to do with the version of XCode on the runner and Apple's Clang 14.0.0?

Change CI MACOSX_DEPLOYMENT_TARGET from 10.13 to 10.9 to allow for continued compatibility with earlier OS versions given that associated wheels are available which meet the dependency version requirements.

The correct fix for building MacOSX wheels is here:
mesonbuild/meson-python#309

We are using this temporary workaround:
scikit-image#6757

SciPy 1.10.1 will also suport 10.9:
scikit-image#6750
@jarrodmillman
Copy link
Contributor

I think we have sorted it out and have a fix (that should be in the next meson-python release) and temporary workaround until then.

The correct fix for building MacOSX wheels is here:
mesonbuild/meson-python#309

We are using this temporary workaround:
#6757

SciPy 1.10.1 will also suport 10.9:
#6750

The most recent version of NumPy already has 10.9 wheels.

@jarrodmillman jarrodmillman merged commit c4bb5f5 into scikit-image:main Feb 17, 2023
@OBgoneSouth
Copy link
Contributor Author

Fantastic!
Thank you so much for all your efforts on this.

@jarrodmillman
Copy link
Contributor

@OBgoneSouth Would you mind testing the latest rc:
https://pypi.org/project/scikit-image/0.20.0rc8/

I think we are basically ready to release 0.20.0 final later this week, so it would be great if you could confirm the MacOSX wheels work for you. Thanks!!

@OBgoneSouth
Copy link
Contributor Author

@jarrodmillman No problem!
All looks good on OS X 10.11 & haven't encountered any issues.

(I notice matplotlib wheels are targeting OS X 10.12 from v3.6.0, but v.3.5.3 works fine.)

python3 -m pip install scikit-image==0.20.0rc8
Collecting scikit-image==0.20.0rc8
  Downloading scikit_image-0.20.0rc8-cp310-cp310-macosx_10_9_x86_64.whl (13.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.0/13.0 MB 3.3 MB/s eta 0:00:00
Requirement already satisfied: PyWavelets>=1.1.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from scikit-image==0.20.0rc8) (1.4.1)
Requirement already satisfied: numpy>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from scikit-image==0.20.0rc8) (1.24.2)
Requirement already satisfied: packaging>=20.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from scikit-image==0.20.0rc8) (23.0)
Requirement already satisfied: lazy_loader>=0.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from scikit-image==0.20.0rc8) (0.1)
Requirement already satisfied: networkx>=2.8 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from scikit-image==0.20.0rc8) (3.0)
Requirement already satisfied: scipy>=1.8 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from scikit-image==0.20.0rc8) (1.10.1)
Requirement already satisfied: tifffile>=2019.7.26 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from scikit-image==0.20.0rc8) (2023.2.3)
Requirement already satisfied: pillow>=9.0.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from scikit-image==0.20.0rc8) (9.4.0)
Requirement already satisfied: imageio>=2.4.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from scikit-image==0.20.0rc8) (2.25.1)
Installing collected packages: scikit-image
Successfully installed scikit-image-0.20.0rc8
=================================== test session starts ===================================
platform darwin -- Python 3.10.4, pytest-7.2.1, pluggy-1.0.0
rootdir: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/skimage
plugins: anyio-3.6.2, cov-4.0.0, localserver-0.7.1
collected 8046 items / 3 skipped
[TESTS]
========================= 8024 passed, 25 skipped in 308.49s (0:05:08) =========================
Premature end of JPEG file
Bogus Huffman table definition

@stefanv
Copy link
Member
stefanv commented Feb 22, 2023

Excellent, thanks for checking!

@OBgoneSouth
Copy link
Contributor Author

Purely for easy reference on matplotlib reasons for 10.12
GUI and Travis.

matplotlib/matplotlib#18128
matplotlib/matplotlib#22179 (comment)
matplotlib/matplotlib#22240
matplotlib/matplotlib#18066

@lagru lagru added the 🤖 type: Infrastructure CI, packaging, tools and automation label Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 type: Infrastructure CI, packaging, tools and automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0