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

At some point, we should stop telling contributors to update setuptools #277

Closed
Jayman2000 opened this issue Dec 27, 2024 · 3 comments · Fixed by #278
Closed

At some point, we should stop telling contributors to update setuptools #277

Jayman2000 opened this issue Dec 27, 2024 · 3 comments · Fixed by #278

Comments

@Jayman2000
Copy link

docs/Hacking.md says:

GYP has a suite of tests which you can run with the provided test driver
to make sure your changes aren't breaking anything important.

You run the test driver with e.g.

$ python -m pip install --upgrade pip setuptools
[…]

As of Python 3.12, Python no longer comes with the setuptools package by default. I tried following the instructions in docs/Hacking.md in a fresh Python 3.13 virtual environment, but I skipped installing/upgrading setuptools (I only upgraded pip). Everything worked fine.

At some point, docs/Hacking.md so that it doesn’t tell users to upgrade setuptools. We could do it after Python 3.10 has reached end of life, or we could do it sooner with a note that says “hey, if you’re using Python 3.12+, don’t upgrade setuptools”.

@cclauss
Copy link
Contributor

cclauss commented Dec 27, 2024

I see no downside to encouraging users to upgrade setuptools because that is the way to get packaging in modern Python.

https://github.com/search?q=repo%3Anodejs%2Fgyp-next%20packaging&type=code

@Jayman2000
Copy link
Author

I see no downside to encouraging users to upgrade setuptools because that is the way to get packaging in modern Python.

https://github.com/search?q=repo%3Anodejs%2Fgyp-next%20packaging&type=code

Let’s say that I create and activate a fresh virtual environment using Python 3.13. When I run the command python -m pip install --upgrade pip setuptools, it will install the setuptools package because the setuptools package wasn’t already installed. Is installing the setuptools package manually the right thing to do in this scenario? Will I not have access to packaging if I don’t manually install setuptools? I had assumed that pip would get all of the build dependencies for me when I ran pip install --editable ".[dev]", but I’m not an expert in Python packaging.

@cclauss
Copy link
Contributor

cclauss commented Dec 28, 2024

You are correct.

Installing gyp-next via pyproject.toml forces the installation of a sufficiently modern setuptools as demonstrated in:

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

Successfully merging a pull request may close this issue.

2 participants