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

Mac OS wheels always fail testing: *.whl is not a supported wheel on this platform #1410

Closed
cdgriffith opened this issue Feb 5, 2023 · 21 comments

Comments

@cdgriffith
Copy link

cdgriffith commented Feb 5, 2023

Description

I have tried creating wheels for mac via github actions on both macos-11 and macos-12 and always run into the same issue, that it creates the wheel and when it tries testing them, it gets the error:

ERROR: python_box-7.0.1-cp38-cp38-macosx_12_0_x86_64.whl is not a supported wheel on this platform.

Work is being done on this develop branch currently https://github.com/cdgriffith/Box/tree/develop

Have tried both just x86_64 and universal2 builds and always seems to build and test an x86_64 version that it then fails on. Made sure to do a manual pip update inside the test env itself with CIBW_BEFORE_TEST: "python -m pip install pip --upgrade" as well as others have had issues with outdated pip versions (locally, not with cibuildwheel)

Build log

https://gist.github.com/cdgriffith/5afcf8db84dfa07b6e833eafcefd2dbe

CI config

https://github.com/cdgriffith/Box/blob/develop/.github/workflows/tests.yml

@joerick
Copy link
Contributor

joerick commented Feb 6, 2023

I have looked this over, and I don't understand this. So I tried running it locally, I ran:

CIBW_BUILD_VERBOSITY=1 CIBW_BEFORE_TEST="python -m pip install pip --upgrade" CIBW_BEFORE_BUILD="python -m pip install pip --upgrade" CIBW_TEST_REQUIRES="pytest msgpack ruamel.yaml tomli tomli-w" CIBW_TEST_COMMAND="pytest {package}/test" pipx run cibuildwheel --only cp38-macosx_x86_64

It succeeded.

Build log

     _ _       _ _   _       _           _
 ___|_| |_ _ _|_| |_| |_ _ _| |_ ___ ___| |
|  _| | . | | | | | . | | | |   | -_| -_| |
|___|_|___|___|_|_|___|_____|_|_|___|___|_|

cibuildwheel version 2.12.0

Build options:
  platform: macos
  architectures: arm64, universal2, x86_64
  build_selector: 
    build_config: cp38-macosx_x86_64
    skip_config: 
    requires_python: None
    prerelease_pythons: False
  container_engine: docker
  output_dir: /private/tmp/Box/wheelhouse
  package_dir: /private/tmp/Box
  test_selector: 
    skip_config:
  before_all: 
  before_build: python -m pip install pip --upgrade
  before_test: python -m pip install pip --upgrade
  build_frontend: pip
  build_verbosity: 1
  config_settings: 
  dependency_constraints: pinned
  environment: 
  manylinux_images: None
  musllinux_images: None
  repair_command: delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
  test_command: pytest {package}/test
  test_extras: 
  test_requires: 
    pytest
    msgpack
    ruamel.yaml
    tomli
    tomli-w

Cache folder: /Users/joerick/Library/Caches/cibuildwheel

Here we go!


Building cp38-macosx_x86_64 wheel
CPython 3.8 macOS x86_64

Installing Python cp38...

+ pkgutil --pkgs

                                                                       ✓ 0.01s
Setting up build environment...

+ /Users/joerick/.local/pipx/.cache/c4ce5506df60cb8/bin/python -sS /Users/joerick/Library/Caches/cibuildwheel/virtualenv-20.17.1.pyz --activators= --no-periodic-update --pip=22.3.1 --setuptools=66.0.0 --wheel=0.38.4 --symlink-app-data --python /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/build/venv
created virtual environment CPython3.8.10.final.0-64 in 41ms
  creator CPython3Posix(dest=/private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/build/venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=22.3.1, setuptools=66.0.0, wheel=0.38.4, via=symlink, app_data_dir=/Users/joerick/Library/Application Support/virtualenv)
    added seed packages: pip==22.3.1, setuptools==66.0.0, wheel==0.38.4
+ python -m pip install --upgrade pip -c /Users/joerick/.local/pipx/.cache/c4ce5506df60cb8/lib/python3.10/site-packages/cibuildwheel/resources/constraints-python38.txt
Requirement already satisfied: pip in ./lib/python3.8/site-packages (22.3.1)
+ which pip
/private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/build/venv/bin/pip
+ pip --version
pip 22.3.1 from /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/build/venv/lib/python3.8/site-packages/pip (python 3.8)
+ which pip
+ which python
/private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/build/venv/bin/python
+ python --version
Python 3.8.10
+ which python

                                                                       ✓ 1.58s
Installing build tools...

+ pip install --upgrade setuptools wheel delocate -c /Users/joerick/.local/pipx/.cache/c4ce5506df60cb8/lib/python3.10/site-packages/cibuildwheel/resources/constraints-python38.txt
Requirement already satisfied: setuptools in /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/build/venv/lib/python3.8/site-packages (66.0.0)
Requirement already satisfied: wheel in /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/build/venv/lib/python3.8/site-packages (0.38.4)
Collecting delocate
  Using cached delocate-0.10.4-py3-none-any.whl (142 kB)
Collecting typing-extensions
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting packaging>=20.9
  Using cached packaging-23.0-py3-none-any.whl (42 kB)
Installing collected packages: typing-extensions, packaging, delocate
Successfully installed delocate-0.10.4 packaging-23.0 typing-extensions-4.4.0

                                                                       ✓ 1.68s
Running before_build...

+ python -m pip install pip --upgrade
Requirement already satisfied: pip in /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/build/venv/lib/python3.8/site-packages (22.3.1)
Collecting pip
  Using cached pip-23.0-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.3.1
    Uninstalling pip-22.3.1:
      Successfully uninstalled pip-22.3.1
Successfully installed pip-23.0

                                                                       ✓ 1.87s
Building wheel...

+ python -m pip wheel /private/tmp/Box --wheel-dir=/private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/built_wheel --no-deps -v
Processing /private/tmp/Box
  Installing build dependencies: started
  Running command pip subprocess to install build dependencies
  Collecting poetry>=0.12
    Using cached poetry-1.3.2-py3-none-any.whl (218 kB)
  Collecting Cython
    Using cached Cython-0.29.33-py2.py3-none-any.whl (987 kB)
  Collecting setuptools
    Using cached setuptools-67.1.0-py3-none-any.whl (1.1 MB)
  Collecting wheel
    Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
  Collecting platformdirs<3.0.0,>=2.5.2
    Using cached platformdirs-2.6.2-py3-none-any.whl (14 kB)
  Collecting cachecontrol[filecache]<0.13.0,>=0.12.9
    Using cached CacheControl-0.12.11-py2.py3-none-any.whl (21 kB)
  Collecting poetry-core==1.4.0
    Using cached poetry_core-1.4.0-py3-none-any.whl (546 kB)
  Collecting jsonschema<5.0.0,>=4.10.0
    Using cached jsonschema-4.17.3-py3-none-any.whl (90 kB)
  Collecting packaging>=20.4
    Using cached packaging-23.0-py3-none-any.whl (42 kB)
  Collecting tomli<3.0.0,>=2.0.1
    Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
  Collecting lockfile<0.13.0,>=0.12.2
    Using cached lockfile-0.12.2-py2.py3-none-any.whl (13 kB)
  Collecting virtualenv!=20.4.5,!=20.4.6,<21.0.0,>=20.4.3
    Using cached virtualenv-20.17.1-py3-none-any.whl (8.8 MB)
  Collecting html5lib<2.0,>=1.0
    Using cached html5lib-1.1-py2.py3-none-any.whl (112 kB)
  Collecting requests<3.0,>=2.18
    Using cached requests-2.28.2-py3-none-any.whl (62 kB)
  Collecting urllib3<2.0.0,>=1.26.0
    Using cached urllib3-1.26.14-py2.py3-none-any.whl (140 kB)
  Collecting xattr<0.11.0,>=0.10.0
    Using cached xattr-0.10.1-cp38-cp38-macosx_10_9_x86_64.whl (15 kB)
  Collecting pexpect<5.0.0,>=4.7.0
    Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
  Collecting filelock<4.0.0,>=3.8.0
    Using cached filelock-3.9.0-py3-none-any.whl (9.7 kB)
  Collecting keyring<24.0.0,>=23.9.0
    Using cached keyring-23.13.1-py3-none-any.whl (37 kB)
  Collecting trove-classifiers>=2022.5.19
    Using cached trove_classifiers-2023.1.20-py3-none-any.whl (13 kB)
  Collecting importlib-metadata<5.0,>=4.4
    Using cached importlib_metadata-4.13.0-py3-none-any.whl (23 kB)
  Collecting pkginfo<2.0,>=1.5
    Using cached pkginfo-1.9.6-py3-none-any.whl (30 kB)
  Collecting poetry-plugin-export<2.0.0,>=1.2.0
    Using cached poetry_plugin_export-1.3.0-py3-none-any.whl (10 kB)
  Collecting crashtest<0.5.0,>=0.4.1
    Using cached crashtest-0.4.1-py3-none-any.whl (7.6 kB)
  Collecting requests-toolbelt<0.11.0,>=0.9.1
    Using cached requests_toolbelt-0.10.1-py2.py3-none-any.whl (54 kB)
  Collecting tomlkit!=0.11.2,!=0.11.3,<1.0.0,>=0.11.1
    Using cached tomlkit-0.11.6-py3-none-any.whl (35 kB)
  Collecting cleo<3.0.0,>=2.0.0
    Using cached cleo-2.0.1-py3-none-any.whl (77 kB)
  Collecting dulwich<0.21.0,>=0.20.46
    Using cached dulwich-0.20.50-cp38-cp38-macosx_10_9_x86_64.whl (460 kB)
  Collecting shellingham<2.0,>=1.5
    Using cached shellingham-1.5.0.post1-py2.py3-none-any.whl (9.4 kB)
  Collecting msgpack>=0.5.2
    Using cached msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl (73 kB)
  Collecting rapidfuzz<3.0.0,>=2.2.0
    Using cached rapidfuzz-2.13.7-cp38-cp38-macosx_10_9_x86_64.whl (1.8 MB)
  Collecting six>=1.9
    Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
  Collecting webencodings
    Using cached webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
  Collecting zipp>=0.5
    Using cached zipp-3.12.1-py3-none-any.whl (6.7 kB)
  Collecting pkgutil-resolve-name>=1.3.10
    Using cached pkgutil_resolve_name-1.3.10-py3-none-any.whl (4.7 kB)
  Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
    Using cached pyrsistent-0.19.3-cp38-cp38-macosx_10_9_universal2.whl (82 kB)
  Collecting importlib-resources>=1.4.0
    Using cached importlib_resources-5.10.2-py3-none-any.whl (34 kB)
  Collecting attrs>=17.4.0
    Using cached attrs-22.2.0-py3-none-any.whl (60 kB)
  Collecting jaraco.classes
    Using cached jaraco.classes-3.2.3-py3-none-any.whl (6.0 kB)
  Collecting ptyprocess>=0.5
    Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
  Collecting charset-normalizer<4,>=2
    Using cached charset_normalizer-3.0.1-cp38-cp38-macosx_10_9_x86_64.whl (122 kB)
  Collecting certifi>=2017.4.17
    Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
  Collecting idna<4,>=2.5
    Using cached idna-3.4-py3-none-any.whl (61 kB)
  Collecting distlib<1,>=0.3.6
    Using cached distlib-0.3.6-py2.py3-none-any.whl (468 kB)
  Collecting cffi>=1.0
    Using cached cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl (178 kB)
  Collecting pycparser
    Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
  Collecting more-itertools
    Using cached more_itertools-9.0.0-py3-none-any.whl (52 kB)
  Installing collected packages: webencodings, trove-classifiers, ptyprocess, msgpack, lockfile, distlib, charset-normalizer, zipp, wheel, urllib3, tomlkit, tomli, six, shellingham, setuptools, rapidfuzz, pyrsistent, pycparser, poetry-core, platformdirs, pkgutil-resolve-name, pkginfo, pexpect, packaging, more-itertools, idna, filelock, Cython, crashtest, certifi, attrs, virtualenv, requests, jaraco.classes, importlib-resources, importlib-metadata, html5lib, dulwich, cleo, cffi, xattr, requests-toolbelt, keyring, jsonschema, cachecontrol, poetry-plugin-export, poetry
  Successfully installed Cython-0.29.33 attrs-22.2.0 cachecontrol-0.12.11 certifi-2022.12.7 cffi-1.15.1 charset-normalizer-3.0.1 cleo-2.0.1 crashtest-0.4.1 distlib-0.3.6 dulwich-0.20.50 filelock-3.9.0 html5lib-1.1 idna-3.4 importlib-metadata-4.13.0 importlib-resources-5.10.2 jaraco.classes-3.2.3 jsonschema-4.17.3 keyring-23.13.1 lockfile-0.12.2 more-itertools-9.0.0 msgpack-1.0.4 packaging-23.0 pexpect-4.8.0 pkginfo-1.9.6 pkgutil-resolve-name-1.3.10 platformdirs-2.6.2 poetry-1.3.2 poetry-core-1.4.0 poetry-plugin-export-1.3.0 ptyprocess-0.7.0 pycparser-2.21 pyrsistent-0.19.3 rapidfuzz-2.13.7 requests-2.28.2 requests-toolbelt-0.10.1 setuptools-67.1.0 shellingham-1.5.0.post1 six-1.16.0 tomli-2.0.1 tomlkit-0.11.6 trove-classifiers-2023.1.20 urllib3-1.26.14 virtualenv-20.17.1 webencodings-0.5.1 wheel-0.38.4 xattr-0.10.1 zipp-3.12.1
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Running command Getting requirements to build wheel
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Running command Preparing metadata (pyproject.toml)
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: python-box
  Building wheel for python-box (pyproject.toml): started
  Running command Building wheel for python-box (pyproject.toml)
  running build
  running build_py
  running build_ext
  Building wheel for python-box (pyproject.toml): finished with status 'done'
  Created wheel for python-box: filename=python_box-7.0.0-cp38-cp38-macosx_10_16_x86_64.whl size=1218069 sha256=6b17928952b6470736b804ff4bce974a4fb448ed51bca56b2e78aba782e5b376
  Stored in directory: /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/pip-ephem-wheel-cache-g0so6c9k/wheels/c9/57/dc/f6121a9b4e19a949b9f2dc0316960066b52b1111ce52ee1ba8
Successfully built python-box

                                                                      ✓ 16.92s
Repairing wheel...

+ delocate-wheel --require-archs x86_64 -w /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/repaired_wheel -v /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/built_wheel/python_box-7.0.0-cp38-cp38-macosx_10_16_x86_64.whl
Fixing: /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/built_wheel/python_box-7.0.0-cp38-cp38-macosx_10_16_x86_64.whl

                                                                       ✓ 6.51s
+ python -sSc 'import platform; print(platform.machine())'
Testing wheel on x86_64...

+ pip install virtualenv -c /Users/joerick/.local/pipx/.cache/c4ce5506df60cb8/lib/python3.10/site-packages/cibuildwheel/resources/constraints-python38.txt
Collecting virtualenv
  Using cached virtualenv-20.17.1-py3-none-any.whl (8.8 MB)
Collecting distlib<1,>=0.3.6
  Using cached distlib-0.3.6-py2.py3-none-any.whl (468 kB)
Collecting filelock<4,>=3.4.1
  Using cached filelock-3.9.0-py3-none-any.whl (9.7 kB)
Collecting platformdirs<3,>=2.4
  Using cached platformdirs-2.6.2-py3-none-any.whl (14 kB)
Installing collected packages: distlib, platformdirs, filelock, virtualenv
Successfully installed distlib-0.3.6 filelock-3.9.0 platformdirs-2.6.2 virtualenv-20.17.1
+ arch -x86_64 python -m virtualenv --no-download /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/venv-test
created virtual environment CPython3.8.10.final.0-64 in 205ms
  creator CPython3Posix(dest=/private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/venv-test, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/joerick/Library/Application Support/virtualenv)
    added seed packages: pip==22.2.2, setuptools==60.9.3, wheel==0.38.4
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
+ arch -x86_64 which python
/private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/venv-test/bin/python
+ arch -x86_64 /bin/sh -c 'python -m pip install pip --upgrade'
Requirement already satisfied: pip in /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/venv-test/lib/python3.8/site-packages (22.2.2)
Collecting pip
  Using cached pip-23.0-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.2.2
    Uninstalling pip-22.2.2:
      Successfully uninstalled pip-22.2.2
Successfully installed pip-23.0
+ arch -x86_64 pip install /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/repaired_wheel/python_box-7.0.0-cp38-cp38-macosx_10_16_x86_64.whl
Processing /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/repaired_wheel/python_box-7.0.0-cp38-cp38-macosx_10_16_x86_64.whl
Installing collected packages: python-box
Successfully installed python-box-7.0.0
+ arch -x86_64 pip install pytest msgpack ruamel.yaml tomli tomli-w
Collecting pytest
  Using cached pytest-7.2.1-py3-none-any.whl (317 kB)
Collecting msgpack
  Using cached msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl (73 kB)
Collecting ruamel.yaml
  Using cached ruamel.yaml-0.17.21-py3-none-any.whl (109 kB)
Collecting tomli
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting tomli-w
  Using cached tomli_w-1.0.0-py3-none-any.whl (6.0 kB)
Collecting attrs>=19.2.0
  Using cached attrs-22.2.0-py3-none-any.whl (60 kB)
Collecting packaging
  Using cached packaging-23.0-py3-none-any.whl (42 kB)
Collecting exceptiongroup>=1.0.0rc8
  Using cached exceptiongroup-1.1.0-py3-none-any.whl (14 kB)
Collecting pluggy<2.0,>=0.12
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting iniconfig
  Using cached iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Collecting ruamel.yaml.clib>=0.2.6
  Using cached ruamel.yaml.clib-0.2.7-cp38-cp38-macosx_10_9_x86_64.whl (143 kB)
Installing collected packages: msgpack, tomli-w, tomli, ruamel.yaml.clib, pluggy, packaging, iniconfig, exceptiongroup, attrs, ruamel.yaml, pytest
Successfully installed attrs-22.2.0 exceptiongroup-1.1.0 iniconfig-2.0.0 msgpack-1.0.4 packaging-23.0 pluggy-1.0.0 pytest-7.2.1 ruamel.yaml-0.17.21 ruamel.yaml.clib-0.2.7 tomli-2.0.1 tomli-w-1.0.0
+ arch -x86_64 /bin/sh -c 'pytest /private/tmp/Box/test'
============================= test session starts ==============================
platform darwin -- Python 3.8.10, pytest-7.2.1, pluggy-1.0.0
rootdir: /private
collected 144 items

../../../../../../../../tmp/Box/test/test_box.py ....................... [ 15%]
........................................................................ [ 65%]
...................                                                      [ 79%]
../../../../../../../../tmp/Box/test/test_box_list.py ..............     [ 88%]
../../../../../../../../tmp/Box/test/test_config_box.py ...              [ 90%]
../../../../../../../../tmp/Box/test/test_converters.py .........        [ 97%]
../../../../../../../../tmp/Box/test/test_from_file.py ...               [ 99%]
../../../../../../../../tmp/Box/test/test_sbox.py .                      [100%]

=============================== warnings summary ===============================
../venv-test/lib/python3.8/site-packages/_pytest/cacheprovider.py:433
  /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/venv-test/lib/python3.8/site-packages/_pytest/cacheprovider.py:433: PytestCacheWarning: could not create cache path /private/.pytest_cache/v/cache/nodeids
    config.cache.set("cache/nodeids", sorted(self.cached_nodeids))

../venv-test/lib/python3.8/site-packages/_pytest/stepwise.py:56
  /private/var/folders/ld/k24nt7054698bctspqwrjq1r0000gn/T/cibw-run-to_w508h/cp38-macosx_x86_64/venv-test/lib/python3.8/site-packages/_pytest/stepwise.py:56: PytestCacheWarning: could not create cache path /private/.pytest_cache/v/cache/stepwise
    session.config.cache.set(STEPWISE_CACHE_DIR, [])

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================= 144 passed, 2 warnings in 0.58s ========================

                                                                       ✓ 9.87s

✓ cp38-macosx_x86_64 finished in 38.51s

Same result if I omit the pip-upgrading options. My build produced python_box-7.0.0-cp38-cp38-macosx_10_16_x86_64.whl, I note the different wheel tag, targeting macosx_10_16_x86_64 rather than macosx_12_0_x86_64.

I notice that you're caching some pip stuff, maybe it'd be worth removing that? otherwise I'm stumped...

@Czaki
Copy link
Contributor

Czaki commented Feb 6, 2023

I'm pretty sure it is connected with macos 12.0 and python 3.8. Could you try to skip the 3.8 version

I do not have access to macOS machine but I remember that there were some problems with the generation of the list of supported platform tags for macos >= 11 and python 3.8

@henryiii
Copy link
Contributor

henryiii commented Feb 6, 2023

This is running though poetry and build.py, which I am not sure I trust. It should be just triggering the underlying setuptools build, though.

There is no such thing as macOS 10.16. That's a non-existent compat version that you can get by setting a special variable. If you don't set it, you get 11.0 (or 12.0?) - maybe @joerick you've done that and saved it and forgotten about it? And is it not reading the correct MACOSX_DEPLOYMENT_TARGET setting?

I'd agree with @Czaki, first see if you can get 3.9+ working, 3.8 was never officially supported by CPython so it's harder to do (edit: for Apple Silicon). It's also the built-in Python on macOS, so it's really nice to support it, though.

@cdgriffith
Copy link
Author

Tried it on macos-11 and also doesn't work, however building on just Python 3.9+ does work!

@Czaki
Copy link
Contributor

Czaki commented Feb 6, 2023

Tried it on macos-11

There is a reason why you do not compile it against some of 10.9-10.15 macos version?

Or still, Poetry does not alow us to build against older macOS release?

@cdgriffith
Copy link
Author

cdgriffith commented Feb 7, 2023

I don't use mac at all, but I assume using latest available would ensure best compatibility and support latest packages better? I want to target who is using it the most and I figured most people would be on newest versions.

I can't use that old of mac version as github actions don't support it actions/runner-images#5583

@Czaki
Copy link
Contributor

Czaki commented Feb 7, 2023

Time to time apple breaks something, so it is normal that people wait up to half year writing until some special software is fixed.

Maybe proper way is to build 3.9+ against 12.0 and 3.8 against 10.15.0

@henryiii
Copy link
Contributor

henryiii commented Feb 7, 2023

You want to try to target the oldest version your code builds on, so that you have the best chance of working - it should work on all newer systems. I'd recommend 10.9 if you don't use C++17, or 10.12-10.14 if you use C++17 (depending on how much you use). Most users are happy with 10.12, really, and these days, 10.15 is probably pretty safe. Apple drops support pretty quickly for older hardware, so there are machines that can't upgrade past 10.15 and even 10.12 (I have one stuck on 10.12, though I don't use it any more).

Note that you do not use 10.12 or any such old version, you just target it with MACOSX_DEPLOYMENT_VERSION. You always use the latest macOS to build. Apple gates all new features by the library version that introduced support (and header only features always work!), so you just target old versions. Not use them to build.

@cdgriffith
Copy link
Author

cdgriffith commented Feb 7, 2023

Is there a magic way to set it with cibuildwheel? I see other threads having issues with it, and putting it in my env section doesn't seem to do it:

        env:
          CIBW_SKIP: "cp36-* pp* *i686 cp37-macosx* cp38-macosx*"
          CIBW_BUILD_VERBOSITY: 1
          CIBW_TEST_REQUIRES: "pytest msgpack ruamel.yaml tomli tomli-w"
          CIBW_TEST_COMMAND: "pytest {package}/test"
          CIBW_BEFORE_BUILD: "python -m pip install pip --upgrade"
          CIBW_BEFORE_TEST: "python -m pip install pip --upgrade"
          CIBW_ARCHS_MACOS: "universal2"
          MACOSX_DEPLOYMENT_TARGET: "10.9"
3 wheels produced in 7 minutes:
  python_box-7.0.1-cp310-cp310-macosx_12_0_x86_64.whl   1,701 kB
  python_box-7.0.1-cp311-cp311-macosx_12_0_x86_64.whl   1,701 kB
  python_box-7.0.1-cp39-cp39-macosx_12_0_x86_64.whl     1,713 kB

I see that it says it should be set in the docs https://cibuildwheel.readthedocs.io/en/stable/cpp_standards/#macos-and-deployment-target-versions but not an example of how to set it.

And thank you for all the help and insight so far! This much already unblocks me!

@joerick
Copy link
Contributor

joerick commented Feb 7, 2023

That's a non-existent compat version that you can get by setting a special variable. If you don't set it, you get 11.0 (or 12.0?) - maybe @joerick you've done that and saved it and forgotten about it?

Nothing in my env relating to that. Only difference is that I'm building in Rosetta emulation, maybe that's the cause. It seems to be the 3.8 Python that's in compat mode for me:

$ /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m platform
macOS-10.16-x86_64-i386-64bit

Time to time apple breaks something

Hmm, yeah, perhaps something in the Apple compiler toolchain changed in the runner images. But that wouldn't make sense if the problem happens in the macos-11 image, Xcode hasn't been updated there in 2 years.

Is there a magic way to set it with cibuildwheel? I see other threads having issues with it, and putting it in my env section doesn't seem to do it:

That's the right place to put it, yeah. It doesn't necessarily set the wheel tag though, since your build might link in a library that's built targeting a newer OS. Or something has gone wrong and that variable isn't being respected. (another note- my spidey senses are telling me that there's some correlation between poetry builds and this variable not being respected, but I can't find a reference to that on the issue tracker...)

@joerick
Copy link
Contributor

joerick commented Feb 8, 2023

@cdgriffith, could you try a couple things? In your CIBW_BEFORE_TEST, try putting

  • python -m pip debug --verbose and
  • SYSTEM_VERSION_COMPAT=0 python -m pip debug --verbose

These give different results for me on my machine, just wanted to check this in CI also. That confuses me, as (I just learned in #1414) there is code in packaging that is supposed to work around this problem by getting the system version with SYSTEM_VERSION_COMPAT=0 internally.

@cdgriffith
Copy link
Author

@joerick sorry for delay, had some fun capturing these https://gist.github.com/cdgriffith/562fc810cc6f585666a42c88aeb9e8c6

@joerick
Copy link
Contributor

joerick commented Feb 9, 2023

These are for Python 3.9, I thought you were having an issue with Python 3.8?

@cdgriffith
Copy link
Author

Oh, yeah that would make sense to include the broken ones >.<

https://gist.github.com/cdgriffith/44c5ea248b2272787a5e27a6f6047740

@joerick
Copy link
Contributor

joerick commented Feb 10, 2023

Yeah, that's what I'm getting, too. Having dug into this further, it looks to me that the packaging fix that @mayeut contributed isn't yet part of pip, as they vendor version 21.3, which is over a year old. wierd... I'll head over and ask them if they can bump their pin.

Aside from that, I'm not really sure why this only affects Python 3.8. Older versions of Python 3.9 have the 10_16 behaviour, newer ones have the correct behaviour, so I think it's probably the SDK used to build, or a build-time flag.

@joerick
Copy link
Contributor

joerick commented Feb 10, 2023

Thanks for your help! I raised an issue with pip about the error.

If there's a reason you do need to target macOS 11+, you can set the env var SYSTEM_VERSION_COMPAT=0 while building, that will circumvent the issue.

Otherwise, it's a case of figuring out why your wheel is requiring such a new macOS. As @henryiii mentioned above, poetry seems like it would be a good place to look, here.

gpongelli added a commit to gpongelli/pycode128 that referenced this issue Feb 17, 2023
pniedzielski added a commit to pniedzielski/blazingmq-sdk-python that referenced this issue Jan 26, 2024
There is a known issue with pip on Python 3.7 and 3.8 where [wheels can’t be
installed on MacOS 11.0 or higher][pip-wheels], even if they were successfully
built with on the same machine.  This is causing our integration tests to fail
in CI for these platforms.  Apparently, the fix is to set the environment
variable `SYSTEM_VERSION_COMPAT` to `0`, as in [this patch][fix].  The current
patch enables this same environment variable.

[pip-wheels]: pypa/cibuildwheel#1410
[fix]: gpongelli/pycode128@066cb37

Signed-off-by: Patrick M. Niedzielski <patrick@pniedzielski.net>
pniedzielski added a commit to pniedzielski/blazingmq-sdk-python that referenced this issue Jan 26, 2024
There is a known issue with pip on Python 3.7 and 3.8 where [wheels can’t be
installed on MacOS 11.0 or higher][pip-wheels], even if they were successfully
built with on the same machine.  This is causing our integration tests to fail
in CI for these platforms.  Apparently, the fix is to set the environment
variable `SYSTEM_VERSION_COMPAT` to `0`, as in [this patch][fix].  The current
patch enables this same environment variable.

[pip-wheels]: pypa/cibuildwheel#1410
[fix]: gpongelli/pycode128@066cb37

Signed-off-by: Patrick M. Niedzielski <patrick@pniedzielski.net>
pniedzielski added a commit to bloomberg/blazingmq-sdk-python that referenced this issue Jan 30, 2024
There is a known issue with pip on Python 3.7 and 3.8 where [wheels can’t be
installed on MacOS 11.0 or higher][pip-wheels], even if they were successfully
built with on the same machine.  This is causing our integration tests to fail
in CI for these platforms.  Apparently, the fix is to set the environment
variable `SYSTEM_VERSION_COMPAT` to `0`, as in [this patch][fix].  The current
patch enables this same environment variable.

[pip-wheels]: pypa/cibuildwheel#1410
[fix]: gpongelli/pycode128@066cb37

Signed-off-by: Patrick M. Niedzielski <patrick@pniedzielski.net>
@15yash
Copy link

15yash commented May 10, 2024

python3 -m pip install PySide6-6.7.0-cp39-abi3-macosx_11_0_universal2.whl

ERROR: PySide6-6.7.0-cp39-abi3-macosx_11_0_universal2.whl is not a supported wheel on this platform.

I see all these comments and I am still unsure on how to install the wheel file?

@henryiii
Copy link
Contributor

What is your pip version? Try python3 -m pip debug -v, does cp39-abi3-macosx_11_0_universal2 show up there?

@15yash
Copy link

15yash commented May 10, 2024

Hi Henry,

cp39-abi3-macosx_11_0_universal2 is not showing up there.

@henryiii
Copy link
Contributor

What pip version?

@15yash
Copy link

15yash commented May 11, 2024

pip 24.0 and python 3.9

What pip version?

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

No branches or pull requests

5 participants