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

setuptools-wrap.py hardcodes archs for macOS which may break building of dependents #1123

Open
barracuda156 opened this issue Nov 8, 2024 · 1 comment

Comments

@barracuda156
Copy link

Example of the issue:

--->  Building py311-blosc2
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-blosc2/py311-blosc2/work/blosc2-2.5.1" && /opt/local/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -m build --no-isolation --wheel --outdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-blosc2/py311-blosc2/work 
* Getting build dependencies for wheel...
/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ptr/__init__.py:81: SetuptoolsDeprecationWarning: The test command is disabled and references to it are deprecated.
!!

        ********************************************************************************
        Please remove any references to `setuptools.command.test` in all supported versions of the affected package.

        By 2024-Nov-15, you need to update your project and remove deprecated calls
        or your builds will no longer be supported.
        ********************************************************************************

!!
  class PyTest(orig.test):
running egg_info
writing blosc2.egg-info/PKG-INFO
writing dependency_links to blosc2.egg-info/dependency_links.txt
writing requirements to blosc2.egg-info/requires.txt
writing top-level names to blosc2.egg-info/top_level.txt
[11/08/24 14:23:59] ERROR    listing git files failed - pretending     git.py:26
                             there aren't any                                   
reading manifest file 'blosc2.egg-info/SOURCES.txt'
adding license file 'LICENSE.txt'
writing manifest file 'blosc2.egg-info/SOURCES.txt'
* Building wheel...
/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ptr/__init__.py:81: SetuptoolsDeprecationWarning: The test command is disabled and references to it are deprecated.
!!

        ********************************************************************************
        Please remove any references to `setuptools.command.test` in all supported versions of the affected package.

        By 2024-Nov-15, you need to update your project and remove deprecated calls
        or your builds will no longer be supported.
        ********************************************************************************

!!
  class PyTest(orig.test):
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
    main()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
    return _build_backend().build_wheel(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/build_meta.py", line 434, in build_wheel
    return _build(['bdist_wheel'])
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/build_meta.py", line 425, in _build
    return self._build_with_temp_dir(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/build_meta.py", line 406, in _build_with_temp_dir
    self.run_setup()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/build_meta.py", line 521, in run_setup
    super().run_setup(setup_script=setup_script)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/build_meta.py", line 319, in run_setup
    exec(code, locals())
  File "<string>", line 24, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 577, in setup
    assert machine in {"x86_64", "arm64", "universal2"}, f"macOS arch {machine} not understood"
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: macOS arch Power Macintosh not understood

ERROR Backend subprocess exited when trying to invoke build_wheel

There are 5 valid archs on which macOS may run (arm64, i386, ppc, ppc64, x86_64). Even though Apple currently sells hardware with 2 of there, there are no reasons to prohibit building open-source software on archs which are not presently in production.

P. S. Originally (by mistake) reported here: pypa/setuptools#4738

@barracuda156
Copy link
Author

Besides, it also does not process the arch correctly. Apparently something in the code relies on uname -m, which returns Power Macintosh. Most likely what is needed is the build arch, and that cannot be inferred from uname. If there is no need to differentiate between 32- and 64-bit, then uname -p returns machine arch powerpc.

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

1 participant