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

chore (main): vendor in Python packaging for Py3.12 #214

Closed cclauss closed 9 months ago

cclauss commented 9 months ago

Fixes #211 Fixes #213

Related to:

distutils was removed in Python 3.12 and the Python Packaging Authority recommends using packaging instead.

Let's vendor in packaging so that installing node-gyp does not require running pip install packaging.

@rzhao271 @DeeDeeG @StefanStojanovic @brjsp

DeeDeeG commented 9 months ago

I think for open source license compliance, LICENSE, LICENSE.APACHE and LICENSE.BSD from here: https://github.com/pypa/packaging should be included alongside all the vendored packaging files.

cclauss commented 9 months ago
DeeDeeG commented 8 months ago

This PR worked for me!

The details of my testing are posted below, for anyone who is curious.

Test method:

Confirming this fix was needed (Testing the "null hypothesis"): I also wanted to confirm once again that this fix is needed and my testing setup is sound, so I checked a couple of other things.

Main Result (This PR Fixes the Errors):

cclauss commented 8 months ago

I confirm that macOS homebrew's brew install python@3.12 will also install python-packaging. You can do brew list to verify its presence.