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
chore: dependencies = setuptools for gyp --version
on Python >= 3.12
#256
base: main
Are you sure you want to change the base?
Conversation
gyp --version
on Python >= 3.12
@@ -12,7 +12,7 @@ description = "A fork of the GYP build system for use in the Node.js projects" | |||
readme = "README.md" | |||
license = { file="LICENSE" } | |||
requires-python = ">=3.8" | |||
dependencies = ["packaging>=24.0"] | |||
dependencies = ["setuptools>=69.5.1"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe packaging
should not be removed as installing setuptools
doesn't come with packaging
.
dependencies = ["setuptools>=69.5.1"] | |
dependencies = ["packaging>=24.0", "setuptools>=69.5.1"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Downloading setuptools-69.5.1-py3-none-any.whl from https://pypi.org/project/setuptools/#files and unarchiving it, I didn't find that packaging
is included in setuptools
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s not have three copies of packing
…
https://github.com/search?q=repo%3Apypa%2Fsetuptools%20packaging&type=code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, packaging
is vendored in setuptools. But as far as I could tell, packaging
in setuptools is not exposed in site-packages
with setuptools. So it would need to import like from setuptools._vendor.packaging.version import Version
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cclauss I created a github action to verify this change: https://github.com/legendecas/gyp-next/actions/runs/9127187853
On Python >= 3.12
%
pipx run --no-cache --spec git+https://github.com/nodejs/gyp-next.git gyp --help
was erroring with%
pipx run --no-cache --spec git+https://github.com/nodejs/gyp-next.git gyp --version
is still erroring withgyp --help
was fixed in gyp-next v0.18.0gyp --version
was notSince both modules are included
setuptools
let's use that recommended fix.Proof:
%
pipx install gyp-next
%
gyp --version
# Fails!%
pipx inject gyp-next setuptools
# This is the same action as this pull request.%
gyp --version
# Works as expected.%
gyp --help
# Works as expected.