Skip to content

Replace deprecated setup.py install command #14568

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bruchar1
Copy link
Member

@bruchar1 bruchar1 commented May 7, 2025

In run_meson_command_tests.py. Replace it with pip install ..

Fixes #14522.

@bruchar1 bruchar1 requested a review from jpakkane as a code owner May 7, 2025 12:08
Copy link
Member

@eli-schwartz eli-schwartz left a comment

Choose a reason for hiding this comment

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

That's just going to break packaging meson when pip isn't installed. e.g. on Gentoo, building meson will have gpep517 installed but almost certainly not pip.

@bruchar1 bruchar1 force-pushed the replace-setuppy-install branch from 871f8bb to 4a8c663 Compare May 7, 2025 13:17
@bruchar1
Copy link
Member Author

bruchar1 commented May 7, 2025

That's just going to break packaging meson when pip isn't installed. e.g. on Gentoo, building meson will have gpep517 installed but almost certainly not pip.

I wasn't sure about this. You confirm it. Unfortunately, it seems pip is installed on the Gentoo CI, so its hard to test for me. I'm blindly trying something...

@bonzini
Copy link
Collaborator

bonzini commented May 7, 2025

The problem is that setuptools (and pip) vendor all sort of crap, so you need to install something. In the end they all use either distlib.wheel, and you could use that to roll your own installation; but because distlib.wheel is usually vendored it's not commonly installed on user machines... it's a nice catch-22.

You could try multiple strategies and then gpep517 could be one of them, but because it uses installer I am not sure it supports Windows well.

Copy link
Member

@eli-schwartz eli-schwartz left a comment

Choose a reason for hiding this comment

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

I wasn't sure about this. You confirm it. Unfortunately, it seems pip is installed on the Gentoo CI, so its hard to test for me. I'm blindly trying something...

Reversing the order would make it test the gpep517 codepath. :P

@bruchar1 bruchar1 force-pushed the replace-setuppy-install branch 3 times, most recently from cc9971c to edad459 Compare May 7, 2025 19:06
@bonzini bonzini requested a review from eli-schwartz May 24, 2025 05:41
@bonzini bonzini added this to the 1.8.2 milestone May 24, 2025
@bruchar1 bruchar1 force-pushed the replace-setuppy-install branch from edad459 to 64d0076 Compare May 26, 2025 12:23
In `run_meson_command_tests.py`.

Replace it with `pip install .` if `pip` is available.
Replace it with 'gpep517 install-from-source` if available.
Else keep the old behaviour.

Fixes mesonbuild#14522.
@bruchar1 bruchar1 force-pushed the replace-setuppy-install branch from 64d0076 to 1dd7f8b Compare May 26, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not use setup.py install
3 participants