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

DEPRECATION: pyobjc-core is being installed using the legacy 'setup.py install' method #550

Closed
glyph opened this issue Apr 24, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@glyph
Copy link

glyph commented Apr 24, 2023

Describe the bug
A clear and concise description of what the bug is.

pip install pyobjc out of the box results in this error:

DEPRECATION: pyobjc-core is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#8559

Platform information

  • Python version: 3.7-3.12
  • How was python installed (python.org, anaconda, homebrew, ...): python.org, homebrew, and pyenv all behave similarly
  • macOS version: 13.3.1/22E261

To Reproduce
pip install will do it in a fresh environment, although you may need

Expected behavior
To install using pyproject.toml I guess?

Additional context
I think installing the wheel package might also work around this issue, but it seems clear that pip is steering folks towards

@glyph glyph added the bug Something isn't working label Apr 24, 2023
@ronaldoussoren
Copy link
Owner

Thanks for the report, that's one I wouldn't have noticed until the deprecation turns into an error because my development environment always has wheel installed.

BTW. Did you install from source by choice? In general the installation should use wheels from PyPI.

@ronaldoussoren
Copy link
Owner

To reproduce the issue: make sure a pip version before 23.1 is installed, with 23.1.1 installed the deprecation message goes away and pip uses the pyproject.toml build method (even with no such file in the archive). The installation appears to be successful.

If I read the linked pip issue correct that's expected: as of 23.1 pip will assume the use of --use-pep517 when no pyproject.toml is present.

@ronaldoussoren
Copy link
Owner

b37f380 adds a trivial pyproject.toml to all subproject to avoid the warning.

This is fairly annoying busy work, but I guess that's the price of progress.

@Alexandro1112
Copy link

That is mean for installation pyobjc 9.1.1, and pip version 23.1?

1 similar comment
@Alexandro1112
Copy link

That is mean for installation pyobjc 9.1.1, and pip version 23.1?

@ronaldoussoren
Copy link
Owner

That is mean for installation pyobjc 9.1.1, and pip version 23.1?

pip install pyobjc should install pyobjc 9.1.1 without errors by way of using the binary wheels on PyPI. Please let me know if that doesn't happen for you, and report the python version and the output of python3-m sysconfig | grep Platform.

With recentish versions of pip before 23.1 you'll get a deprecation warning as mentioned the initial message for this issue, you can work around this by ensuring that wheel is installed (pip install wheel before pip install pyobjc).

The changeset I pushed earlier tonight explicitly opts pyobjc into the new method for building wheels to avoid problems later if the pip maintainers ever decide to drop the legacy build method.

@Alexandro1112
Copy link

I used command pip3 install PyObjC==9.1.1. Installation has been successfully.

@ronaldoussoren
Copy link
Owner

Reopening because the minimal pyproject.toml somehow doesn't work for the framework bindings. The error says the 'pyobjc_setup' cannot be found, even though it is present in the checkout and sdist archives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants