nodejs / gyp-next

A fork of the GYP build system for use in the Node.js projects
BSD 3-Clause "New" or "Revised" License
125 stars 69 forks source link

nodejs-windows: python -m pip install packaging #213

Closed cclauss closed 9 months ago

cclauss commented 9 months ago

@rzhao271

targos commented 9 months ago

Why is it needed suddenly?

rzhao271 commented 9 months ago

@cclauss PR LGTM, but I don't think it'll vendor the packaging package into the node-gyp npm package. the pip install --editable . line might also be installing the packaging package already, but pip can detect duplicate installs anyway, and listing out the packaging package seems clearer to me.

@targos node-gyp currently relies on distutils for detecting the Python version. Python 3.10 deprecates that package, and Python 3.12 removes distutils completely. The recommendation is to use the packaging package instead of distutils.version. Because node-gyp hasn't moved away from distutils yet, it is currently unusable on devices running Python 3.12.

cclauss commented 9 months ago

Agreed. I will get the vendoring done soon.

cclauss commented 9 months ago

I put this in DRAFT because I sense that we will close it with unmerged commits in favor of #214.