Skip to content

Commit 80e9c79

Browse files
feat: update gyp-next to v0.20.0 (#3149)
1 parent 0cf16d2 commit 80e9c79

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+312
-307
lines changed

gyp/.github/workflows/node-gyp.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
node-version: ["22"]
13-
os: [macos-13, macos-14, ubuntu-latest, windows-latest]
14-
python-version: ["3.8", "3.10", "3.12", "3.13"]
13+
os: [macos-latest, ubuntu-latest, windows-latest]
14+
python-version: ["3.9", "3.11", "3.13"]
15+
include:
16+
- node-version: "22"
17+
os: macos-13
18+
python-version: "3.13"
19+
- node-version: "22"
20+
os: windows-2025
21+
python-version: "3.13"
1522
runs-on: ${{ matrix.os }}
1623
steps:
1724
- name: Clone gyp-next
@@ -33,7 +40,7 @@ jobs:
3340
- name: Install Python dependencies
3441
run: |
3542
cd gyp-next
36-
python -m pip install --upgrade pip setuptools
43+
python -m pip install --upgrade pip
3744
pip install --editable .
3845
pip uninstall -y gyp-next
3946
- name: Install Node.js dependencies
@@ -47,7 +54,6 @@ jobs:
4754
cp -r gyp-next node-gyp/gyp
4855
- name: Run tests (macOS or Linux)
4956
if: runner.os != 'Windows'
50-
shell: bash
5157
run: |
5258
cd node-gyp
5359
npm test --python="${pythonLocation}/python"

gyp/.github/workflows/nodejs.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os: [macos-13, macos-latest, ubuntu-latest, windows-latest]
13-
python: ["3.8", "3.10", "3.12", "3.13"]
12+
os: [macos-latest, ubuntu-latest, windows-latest]
13+
python: ["3.9", "3.11", "3.13"]
14+
include:
15+
- os: macos-13
16+
python-version: "3.13"
17+
- os: windows-2025
18+
python-version: "3.13"
1419

1520
runs-on: ${{ matrix.os }}
1621
steps:

gyp/.github/workflows/python_tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
max-parallel: 5
1616
matrix:
17-
os: [macos-13, macos-14, ubuntu-latest] # , windows-latest]
17+
os: [macos-13, macos-latest, ubuntu-latest] # , windows-latest]
1818
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1919
steps:
2020
- uses: actions/checkout@v4
@@ -23,14 +23,14 @@ jobs:
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525
allow-prereleases: true
26-
- uses: seanmiddleditch/gha-setup-ninja@v5
26+
- uses: seanmiddleditch/gha-setup-ninja@v6
2727
- name: Install dependencies
2828
run: |
29-
python -m pip install --upgrade pip setuptools
29+
python -m pip install --upgrade pip
3030
pip install --editable ".[dev]"
3131
- run: ./gyp -V && ./gyp --version && gyp -V && gyp --version
3232
- name: Lint with ruff # See pyproject.toml for settings
33-
run: ruff check --output-format=github .
33+
uses: astral-sh/ruff-action@v3
3434
- name: Test with pytest # See pyproject.toml for settings
3535
run: pytest
3636
# - name: Run doctests with pytest

gyp/.github/workflows/release-please.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,8 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- uses: actions/checkout@v4
28-
- name: Set up Python
29-
uses: actions/setup-python@v5
30-
with:
31-
python-version: "3.12"
32-
- name: Install pypa/build
33-
run: >-
34-
python3 -m pip install build --user
3528
- name: Build a binary wheel and a source tarball
36-
run: python3 -m build
29+
run: pipx run build
3730
- name: Store the distribution packages
3831
uses: actions/upload-artifact@v4
3932
with:

gyp/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,6 @@ cython_debug/
141141
# static files generated from Django application using `collectstatic`
142142
media
143143
static
144+
145+
test/fixtures/out
146+
*.actual

gyp/.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.19.1"
2+
".": "0.20.0"
33
}

gyp/CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## [0.20.0](https://github.com./nodejs/gyp-next/compare/v0.19.1...v0.20.0) (2025-03-27)
4+
5+
6+
### ⚠ BREAKING CHANGES
7+
8+
* resolve issue with relative paths during linking ([#284](https://github.com./nodejs/gyp-next/issues/284))
9+
10+
### Bug Fixes
11+
12+
* python lint more ruff rules ([#291](https://github.com./nodejs/gyp-next/issues/291)) ([fabc78c](https://github.com./nodejs/gyp-next/commit/fabc78caffcf988365d970ced5a151f40525077e))
13+
* remove explicit installation of setuptools ([#278](https://github.com./nodejs/gyp-next/issues/278)) ([e476778](https://github.com./nodejs/gyp-next/commit/e4767782c70ca8427184694589d9f0ded5eeed22))
14+
* resolve issue with relative paths during linking ([#284](https://github.com./nodejs/gyp-next/issues/284)) ([a2d7439](https://github.com./nodejs/gyp-next/commit/a2d7439fbd3c03f01e1149fdbe682f754bc6cc7f))
15+
316
## [0.19.1](https://github.com./nodejs/gyp-next/compare/v0.19.0...v0.19.1) (2024-12-09)
417

518

gyp/docs/Hacking.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ to make sure your changes aren't breaking anything important.
2424
You run the test driver with e.g.
2525

2626
``` sh
27-
$ python -m pip install --upgrade pip setuptools
27+
$ python -m pip install --upgrade pip
2828
$ pip install --editable ".[dev]"
2929
$ python -m pytest
3030
```

gyp/docs/InputFormatReference.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ lists associated with the following keys, are treated as pathnames:
194194
* include\_dirs
195195
* inputs
196196
* libraries
197+
* library\_dirs
197198
* outputs
198199
* sources
199200
* mac\_bundle\_resources
@@ -231,7 +232,8 @@ Source dictionary from `../build/common.gypi`:
231232
```
232233
{
233234
'include_dirs': ['include'], # Treated as relative to ../build
234-
'libraries': ['-lz'], # Not treated as a pathname, begins with a dash
235+
'library_dirs': ['lib'], # Treated as relative to ../build
236+
'libraries': ['-lz'], # Not treated as a pathname, begins with a dash
235237
'defines': ['NDEBUG'], # defines does not contain pathnames
236238
}
237239
```
@@ -250,6 +252,7 @@ Merged dictionary:
250252
{
251253
'sources': ['string_util.cc'],
252254
'include_dirs': ['../build/include'],
255+
'library_dirs': ['../build/lib'],
253256
'libraries': ['-lz'],
254257
'defines': ['NDEBUG'],
255258
}

gyp/gyp_main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# found in the LICENSE file.
66

77
import os
8-
import sys
98
import subprocess
9+
import sys
1010

1111

1212
def IsCygwin():

gyp/pylib/gyp/MSVSProject.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
"""Visual Studio project reader/writer."""
66

7-
import gyp.easy_xml as easy_xml
7+
from gyp import easy_xml
88

99
# ------------------------------------------------------------------------------
1010

gyp/pylib/gyp/MSVSSettings_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
"""Unit tests for the MSVSSettings.py file."""
88

99
import unittest
10-
import gyp.MSVSSettings as MSVSSettings
11-
1210
from io import StringIO
1311

12+
from gyp import MSVSSettings
13+
1414

1515
class TestSequenceFunctions(unittest.TestCase):
1616
def setUp(self):

gyp/pylib/gyp/MSVSToolFile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
"""Visual Studio project reader/writer."""
66

7-
import gyp.easy_xml as easy_xml
7+
from gyp import easy_xml
88

99

1010
class Writer:

gyp/pylib/gyp/MSVSUserFile.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
import re
99
import socket # for gethostname
1010

11-
import gyp.easy_xml as easy_xml
12-
11+
from gyp import easy_xml
1312

1413
# ------------------------------------------------------------------------------
1514

gyp/pylib/gyp/MSVSUtil.py

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import copy
88
import os
99

10-
1110
# A dictionary mapping supported target types to extensions.
1211
TARGET_TYPE_EXT = {
1312
"executable": "exe",

gyp/pylib/gyp/MSVSVersion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"""Handle version information related to Visual Stuio."""
66

77
import errno
8+
import glob
89
import os
910
import re
1011
import subprocess
1112
import sys
12-
import glob
1313

1414

1515
def JoinPath(*args):

gyp/pylib/gyp/__init__.py

+14-15
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
# found in the LICENSE file.
66

77
from __future__ import annotations
8-
import copy
9-
import gyp.input
8+
109
import argparse
10+
import copy
1111
import os.path
1212
import re
1313
import shlex
1414
import sys
1515
import traceback
16-
from gyp.common import GypError
1716

17+
import gyp.input
18+
from gyp.common import GypError
1819

1920
# Default debug modes for GYP
2021
debug = {}
@@ -205,8 +206,7 @@ def NameValueListToDict(name_value_list):
205206

206207

207208
def ShlexEnv(env_name):
208-
flags = os.environ.get(env_name, [])
209-
if flags:
209+
if flags := os.environ.get(env_name) or []:
210210
flags = shlex.split(flags)
211211
return flags
212212

@@ -361,7 +361,7 @@ def gyp_main(args):
361361
action="store",
362362
env_name="GYP_CONFIG_DIR",
363363
default=None,
364-
help="The location for configuration files like " "include.gypi.",
364+
help="The location for configuration files like include.gypi.",
365365
)
366366
parser.add_argument(
367367
"-d",
@@ -525,19 +525,18 @@ def gyp_main(args):
525525
# If no format was given on the command line, then check the env variable.
526526
generate_formats = []
527527
if options.use_environment:
528-
generate_formats = os.environ.get("GYP_GENERATORS", [])
528+
generate_formats = os.environ.get("GYP_GENERATORS") or []
529529
if generate_formats:
530530
generate_formats = re.split(r"[\s,]", generate_formats)
531531
if generate_formats:
532532
options.formats = generate_formats
533+
# Nothing in the variable, default based on platform.
534+
elif sys.platform == "darwin":
535+
options.formats = ["xcode"]
536+
elif sys.platform in ("win32", "cygwin"):
537+
options.formats = ["msvs"]
533538
else:
534-
# Nothing in the variable, default based on platform.
535-
if sys.platform == "darwin":
536-
options.formats = ["xcode"]
537-
elif sys.platform in ("win32", "cygwin"):
538-
options.formats = ["msvs"]
539-
else:
540-
options.formats = ["make"]
539+
options.formats = ["make"]
541540

542541
if not options.generator_output and options.use_environment:
543542
g_o = os.environ.get("GYP_GENERATOR_OUTPUT")
@@ -696,7 +695,7 @@ def main(args):
696695
return 1
697696

698697

699-
# NOTE: setuptools generated console_scripts calls function with no arguments
698+
# NOTE: console_scripts calls this function with no arguments
700699
def script_main():
701700
return main(sys.argv[1:])
702701

gyp/pylib/gyp/common.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
import filecmp
77
import os.path
88
import re
9-
import tempfile
10-
import sys
11-
import subprocess
129
import shlex
13-
10+
import subprocess
11+
import sys
12+
import tempfile
1413
from collections.abc import MutableSet
1514

1615

@@ -35,7 +34,6 @@ class GypError(Exception):
3534
to the user. The main entry point will catch and display this.
3635
"""
3736

38-
pass
3937

4038

4139
def ExceptionAppend(e, msg):

0 commit comments

Comments
 (0)