Commit ee6a837

Browse files
committed
gyp: update gyp to 0.6.1
Closes: #2236 PR-URL: #2238 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent 3e7f8cc commit ee6a837

21 files changed

Lines changed: 210 additions & 243 deletions

‎gyp/.flake8‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
2-
max-complexity = 10
2+
max-complexity = 101
33
max-line-length = 88
4-
extend-ignore = E203,C901,E501
4+
extend-ignore = E203# whitespace before ':' to agree with psf/black

‎gyp/.github/workflows/Python_tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
max-parallel: 15
1313
matrix:
1414
os: [macos-latest, ubuntu-latest] # , windows-latest]
15-
python-version: [2.7, 3.6, 3.7, 3.8] # 3.5,
15+
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up Python ${{ matrix.python-version }}

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: node-gyp integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [macos-latest, ubuntu-latest, windows-latest]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- name: Clone gyp-next
14+
uses: actions/checkout@v2
15+
with:
16+
path: gyp-next
17+
- name: Clone nodejs/node-gyp
18+
uses: actions/checkout@v2
19+
with:
20+
repository: nodejs/node-gyp
21+
path: node-gyp
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: 14.x
25+
- uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.9
28+
- name: Install dependencies
29+
run: |
30+
cd node-gyp
31+
npm install --no-progress
32+
- name: Replace gyp in node-gyp
33+
shell: bash
34+
run: |
35+
rm -rf node-gyp/gyp
36+
cp -r gyp-next node-gyp/gyp
37+
- name: Run tests
38+
run: |
39+
cd node-gyp
40+
npm test

‎gyp/.github/workflows/nodejs-windows.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build-windows:
77
runs-on: windows-latest
88
steps:
9-
- name: Clone node-gyp
9+
- name: Clone gyp-next
1010
uses: actions/checkout@v2
1111
with:
1212
path: gyp-next

‎gyp/CHANGELOG.md‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
## [0.6.1] - 2020-10-14
10+
11+
### Fixed
12+
- Correctly rename object files for absolute paths in MSVS generator.
13+
14+
## [0.6.0] - 2020-10-13
15+
16+
### Added
17+
- The Makefile generator will now output shared libraries directly to the product
18+
directory on all platforms (previously only macOS).
19+
20+
## [0.5.0] - 2020-09-30
21+
22+
### Added
23+
- Extended compile_commands_json generator to consider more file extensions than
24+
just `c` and `cc`. `cpp` and `cxx` are now supported.
25+
- Source files with duplicate basenames are now supported.
26+
27+
### Removed
28+
- The `--no-duplicate-basename-check` option was removed.
29+
- The `msvs_enable_marmasm` configuration option was removed in favor of
30+
auto-inclusion of the "marmasm" sections for Windows on ARM.
31+
932
## [0.4.0] - 2020-07-14
1033

1134
### Added
@@ -34,7 +57,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3457
This is the first release of this project, based on https://chromium.googlesource.com/external/gyp
3558
with changes made over the years in Node.js and node-gyp.
3659

37-
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.4.0...HEAD
60+
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.6.1...HEAD
61+
[0.6.1]: https://github.com/nodejs/gyp-next/compare/v0.6.0...v0.6.1
62+
[0.6.0]: https://github.com/nodejs/gyp-next/compare/v0.5.0...v0.6.0
63+
[0.5.0]: https://github.com/nodejs/gyp-next/compare/v0.4.0...v0.5.0
3864
[0.4.0]: https://github.com/nodejs/gyp-next/compare/v0.3.0...v0.4.0
3965
[0.3.0]: https://github.com/nodejs/gyp-next/compare/v0.2.1...v0.3.0
4066
[0.2.1]: https://github.com/nodejs/gyp-next/compare/v0.2.0...v0.2.1

‎gyp/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ GYP can Generate Your Projects.
22
===================================
33

44
Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline.
5+
6+
__gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command:
7+
*`python3 -m pip install gyp-next`

‎gyp/pylib/gyp/MSVSSettings_test.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@ def testConvertToMSBuildSettings_warnings(self):
678678
"MSBuild, index value (21) not in expected range [0, 3)",
679679
"Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to "
680680
"MSBuild, index value (13) not in expected range [0, 3)",
681-
"Warning: while converting VCCLCompilerTool/GeneratePreprocessedFile to "
681+
"Warning: while converting "
682+
"VCCLCompilerTool/GeneratePreprocessedFile to "
682683
"MSBuild, value must be one of [0, 1, 2]; got 14",
683684
"Warning: while converting VCLinkerTool/Driver to "
684685
"MSBuild, index value (10) not in expected range [0, 4)",
@@ -1348,7 +1349,8 @@ def testConvertToMSBuildSettings_actual(self):
13481349
"EmbedManifest": "false",
13491350
"GenerateCatalogFiles": "true",
13501351
"InputResourceManifests": "asfsfdafs",
1351-
"ManifestResourceFile": "$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
1352+
"ManifestResourceFile":
1353+
"$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
13521354
"OutputManifestFile": "$(TargetPath).manifestdfs",
13531355
"RegistrarScriptFile": "sdfsfd",
13541356
"ReplacementsFile": "sdffsd",
@@ -1532,7 +1534,8 @@ def testConvertToMSBuildSettings_actual(self):
15321534
"LinkIncremental": "",
15331535
},
15341536
"ManifestResourceCompile": {
1535-
"ResourceOutputFileName": "$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
1537+
"ResourceOutputFileName":
1538+
"$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
15361539
},
15371540
}
15381541
self.maxDiff=9999# on failure display a long diff

‎gyp/pylib/gyp/__init__.py‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def Load(
6868
params=None,
6969
check=False,
7070
circular_check=True,
71-
duplicate_basename_check=True,
7271
):
7372
"""
7473
Loads one or more specified build files.
@@ -156,7 +155,6 @@ def Load(
156155
generator_input_info,
157156
check,
158157
circular_check,
159-
duplicate_basename_check,
160158
params["parallel"],
161159
params["root_targets"],
162160
)
@@ -431,20 +429,6 @@ def gyp_main(args):
431429
regenerate=False,
432430
help="don't check for circular relationships between files",
433431
)
434-
# --no-duplicate-basename-check disables the check for duplicate basenames
435-
# in a static_library/shared_library project. Visual C++ 2008 generator
436-
# doesn't support this configuration. Libtool on Mac also generates warnings
437-
# when duplicate basenames are passed into Make generator on Mac.
438-
# TODO(yukawa): Remove this option when these legacy generators are
439-
# deprecated.
440-
parser.add_argument(
441-
"--no-duplicate-basename-check",
442-
dest="duplicate_basename_check",
443-
action="store_false",
444-
default=True,
445-
regenerate=False,
446-
help="don't check for duplicate basenames",
447-
)
448432
parser.add_argument(
449433
"--no-parallel",
450434
action="store_true",
@@ -651,7 +635,6 @@ def gyp_main(args):
651635
params,
652636
options.check,
653637
options.circular_check,
654-
options.duplicate_basename_check,
655638
)
656639

657640
# TODO(mark): Pass |data| for now because the generator needs a list of

‎gyp/pylib/gyp/common.py‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,14 @@ class Writer(object):
352352
"""Wrapper around file which only covers the target if it differs."""
353353

354354
def__init__(self):
355-
# On Cygwin remove the "dir" argument because `C:` prefixed paths are treated as relative,
356-
# consequently ending up with current dir "/cygdrive/c/..." being prefixed to those, which was
357-
# obviously a non-existent path, for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
358-
# See https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp for more details
355+
# On Cygwin remove the "dir" argument
356+
# `C:` prefixed paths are treated as relative,
357+
# consequently ending up with current dir "/cygdrive/c/..."
358+
# being prefixed to those, which was
359+
# obviously a non-existent path,
360+
# for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
361+
# For more details see:
362+
# https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp
359363
base_temp_dir=""ifIsCygwin() elseos.path.dirname(filename)
360364
# Pick temporary file.
361365
tmp_fd, self.tmp_path=tempfile.mkstemp(
@@ -391,13 +395,15 @@ def close(self):
391395
# one.
392396
os.unlink(self.tmp_path)
393397
else:
394-
# The new file is different from the old one, or there is no old one.
398+
# The new file is different from the old one,
399+
# or there is no old one.
395400
# Rename the new file to the permanent name.
396401
#
397402
# tempfile.mkstemp uses an overly restrictive mode, resulting in a
398403
# file that can only be read by the owner, regardless of the umask.
399-
# There's no reason to not respect the umask here, which means that
400-
# an extra hoop is required to fetch it and reset the new file's mode.
404+
# There's no reason to not respect the umask here,
405+
# which means that an extra hoop is required
406+
# to fetch it and reset the new file's mode.
401407
#
402408
# No way to get the umask without setting a new one? Set a safe one
403409
# and then set it back to the old value.
@@ -406,8 +412,8 @@ def close(self):
406412
os.chmod(self.tmp_path, 0o666&~umask)
407413
ifsys.platform=="win32"andos.path.exists(filename):
408414
# NOTE: on windows (but not cygwin) rename will not replace an
409-
# existing file, so it must be preceded with a remove. Sadly there
410-
# is no way to make the switch atomic.
415+
# existing file, so it must be preceded with a remove.
416+
# Sadly there is no way to make the switch atomic.
411417
os.remove(filename)
412418
os.rename(self.tmp_path, filename)
413419
exceptException:

‎gyp/pylib/gyp/generator/android.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def WriteSources(self, spec, configs, extra_sources):
557557
These are source files necessary to build the current target.
558558
We need to handle shared_intermediate directory source files as
559559
a special case by copying them to the intermediate directory and
560-
treating them as a genereated sources. Otherwise the Android build
560+
treating them as a generated sources. Otherwise the Android build
561561
rules won't pick them up.
562562
563563
Args:

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Commit ee6a837

Browse files
committed
gyp: update gyp to 0.6.1
Closes: #2236 PR-URL: #2238 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent 3e7f8cc commit ee6a837

21 files changed

Lines changed: 210 additions & 243 deletions

‎gyp/.flake8‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
2-
max-complexity = 10
2+
max-complexity = 101
33
max-line-length = 88
4-
extend-ignore = E203,C901,E501
4+
extend-ignore = E203# whitespace before ':' to agree with psf/black

‎gyp/.github/workflows/Python_tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
max-parallel: 15
1313
matrix:
1414
os: [macos-latest, ubuntu-latest] # , windows-latest]
15-
python-version: [2.7, 3.6, 3.7, 3.8] # 3.5,
15+
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up Python ${{ matrix.python-version }}

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: node-gyp integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [macos-latest, ubuntu-latest, windows-latest]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- name: Clone gyp-next
14+
uses: actions/checkout@v2
15+
with:
16+
path: gyp-next
17+
- name: Clone nodejs/node-gyp
18+
uses: actions/checkout@v2
19+
with:
20+
repository: nodejs/node-gyp
21+
path: node-gyp
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: 14.x
25+
- uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.9
28+
- name: Install dependencies
29+
run: |
30+
cd node-gyp
31+
npm install --no-progress
32+
- name: Replace gyp in node-gyp
33+
shell: bash
34+
run: |
35+
rm -rf node-gyp/gyp
36+
cp -r gyp-next node-gyp/gyp
37+
- name: Run tests
38+
run: |
39+
cd node-gyp
40+
npm test

‎gyp/.github/workflows/nodejs-windows.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build-windows:
77
runs-on: windows-latest
88
steps:
9-
- name: Clone node-gyp
9+
- name: Clone gyp-next
1010
uses: actions/checkout@v2
1111
with:
1212
path: gyp-next

‎gyp/CHANGELOG.md‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
## [0.6.1] - 2020-10-14
10+
11+
### Fixed
12+
- Correctly rename object files for absolute paths in MSVS generator.
13+
14+
## [0.6.0] - 2020-10-13
15+
16+
### Added
17+
- The Makefile generator will now output shared libraries directly to the product
18+
directory on all platforms (previously only macOS).
19+
20+
## [0.5.0] - 2020-09-30
21+
22+
### Added
23+
- Extended compile_commands_json generator to consider more file extensions than
24+
just `c` and `cc`. `cpp` and `cxx` are now supported.
25+
- Source files with duplicate basenames are now supported.
26+
27+
### Removed
28+
- The `--no-duplicate-basename-check` option was removed.
29+
- The `msvs_enable_marmasm` configuration option was removed in favor of
30+
auto-inclusion of the "marmasm" sections for Windows on ARM.
31+
932
## [0.4.0] - 2020-07-14
1033

1134
### Added
@@ -34,7 +57,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3457
This is the first release of this project, based on https://chromium.googlesource.com/external/gyp
3558
with changes made over the years in Node.js and node-gyp.
3659

37-
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.4.0...HEAD
60+
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.6.1...HEAD
61+
[0.6.1]: https://github.com/nodejs/gyp-next/compare/v0.6.0...v0.6.1
62+
[0.6.0]: https://github.com/nodejs/gyp-next/compare/v0.5.0...v0.6.0
63+
[0.5.0]: https://github.com/nodejs/gyp-next/compare/v0.4.0...v0.5.0
3864
[0.4.0]: https://github.com/nodejs/gyp-next/compare/v0.3.0...v0.4.0
3965
[0.3.0]: https://github.com/nodejs/gyp-next/compare/v0.2.1...v0.3.0
4066
[0.2.1]: https://github.com/nodejs/gyp-next/compare/v0.2.0...v0.2.1

‎gyp/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ GYP can Generate Your Projects.
22
===================================
33

44
Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline.
5+
6+
__gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command:
7+
*`python3 -m pip install gyp-next`

‎gyp/pylib/gyp/MSVSSettings_test.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@ def testConvertToMSBuildSettings_warnings(self):
678678
"MSBuild, index value (21) not in expected range [0, 3)",
679679
"Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to "
680680
"MSBuild, index value (13) not in expected range [0, 3)",
681-
"Warning: while converting VCCLCompilerTool/GeneratePreprocessedFile to "
681+
"Warning: while converting "
682+
"VCCLCompilerTool/GeneratePreprocessedFile to "
682683
"MSBuild, value must be one of [0, 1, 2]; got 14",
683684
"Warning: while converting VCLinkerTool/Driver to "
684685
"MSBuild, index value (10) not in expected range [0, 4)",
@@ -1348,7 +1349,8 @@ def testConvertToMSBuildSettings_actual(self):
13481349
"EmbedManifest": "false",
13491350
"GenerateCatalogFiles": "true",
13501351
"InputResourceManifests": "asfsfdafs",
1351-
"ManifestResourceFile": "$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
1352+
"ManifestResourceFile":
1353+
"$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
13521354
"OutputManifestFile": "$(TargetPath).manifestdfs",
13531355
"RegistrarScriptFile": "sdfsfd",
13541356
"ReplacementsFile": "sdffsd",
@@ -1532,7 +1534,8 @@ def testConvertToMSBuildSettings_actual(self):
15321534
"LinkIncremental": "",
15331535
},
15341536
"ManifestResourceCompile": {
1535-
"ResourceOutputFileName": "$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
1537+
"ResourceOutputFileName":
1538+
"$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
15361539
},
15371540
}
15381541
self.maxDiff=9999# on failure display a long diff

‎gyp/pylib/gyp/__init__.py‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def Load(
6868
params=None,
6969
check=False,
7070
circular_check=True,
71-
duplicate_basename_check=True,
7271
):
7372
"""
7473
Loads one or more specified build files.
@@ -156,7 +155,6 @@ def Load(
156155
generator_input_info,
157156
check,
158157
circular_check,
159-
duplicate_basename_check,
160158
params["parallel"],
161159
params["root_targets"],
162160
)
@@ -431,20 +429,6 @@ def gyp_main(args):
431429
regenerate=False,
432430
help="don't check for circular relationships between files",
433431
)
434-
# --no-duplicate-basename-check disables the check for duplicate basenames
435-
# in a static_library/shared_library project. Visual C++ 2008 generator
436-
# doesn't support this configuration. Libtool on Mac also generates warnings
437-
# when duplicate basenames are passed into Make generator on Mac.
438-
# TODO(yukawa): Remove this option when these legacy generators are
439-
# deprecated.
440-
parser.add_argument(
441-
"--no-duplicate-basename-check",
442-
dest="duplicate_basename_check",
443-
action="store_false",
444-
default=True,
445-
regenerate=False,
446-
help="don't check for duplicate basenames",
447-
)
448432
parser.add_argument(
449433
"--no-parallel",
450434
action="store_true",
@@ -651,7 +635,6 @@ def gyp_main(args):
651635
params,
652636
options.check,
653637
options.circular_check,
654-
options.duplicate_basename_check,
655638
)
656639

657640
# TODO(mark): Pass |data| for now because the generator needs a list of

‎gyp/pylib/gyp/common.py‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,14 @@ class Writer(object):
352352
"""Wrapper around file which only covers the target if it differs."""
353353

354354
def__init__(self):
355-
# On Cygwin remove the "dir" argument because `C:` prefixed paths are treated as relative,
356-
# consequently ending up with current dir "/cygdrive/c/..." being prefixed to those, which was
357-
# obviously a non-existent path, for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
358-
# See https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp for more details
355+
# On Cygwin remove the "dir" argument
356+
# `C:` prefixed paths are treated as relative,
357+
# consequently ending up with current dir "/cygdrive/c/..."
358+
# being prefixed to those, which was
359+
# obviously a non-existent path,
360+
# for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
361+
# For more details see:
362+
# https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp
359363
base_temp_dir=""ifIsCygwin() elseos.path.dirname(filename)
360364
# Pick temporary file.
361365
tmp_fd, self.tmp_path=tempfile.mkstemp(
@@ -391,13 +395,15 @@ def close(self):
391395
# one.
392396
os.unlink(self.tmp_path)
393397
else:
394-
# The new file is different from the old one, or there is no old one.
398+
# The new file is different from the old one,
399+
# or there is no old one.
395400
# Rename the new file to the permanent name.
396401
#
397402
# tempfile.mkstemp uses an overly restrictive mode, resulting in a
398403
# file that can only be read by the owner, regardless of the umask.
399-
# There's no reason to not respect the umask here, which means that
400-
# an extra hoop is required to fetch it and reset the new file's mode.
404+
# There's no reason to not respect the umask here,
405+
# which means that an extra hoop is required
406+
# to fetch it and reset the new file's mode.
401407
#
402408
# No way to get the umask without setting a new one? Set a safe one
403409
# and then set it back to the old value.
@@ -406,8 +412,8 @@ def close(self):
406412
os.chmod(self.tmp_path, 0o666&~umask)
407413
ifsys.platform=="win32"andos.path.exists(filename):
408414
# NOTE: on windows (but not cygwin) rename will not replace an
409-
# existing file, so it must be preceded with a remove. Sadly there
410-
# is no way to make the switch atomic.
415+
# existing file, so it must be preceded with a remove.
416+
# Sadly there is no way to make the switch atomic.
411417
os.remove(filename)
412418
os.rename(self.tmp_path, filename)
413419
exceptException:

‎gyp/pylib/gyp/generator/android.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def WriteSources(self, spec, configs, extra_sources):
557557
These are source files necessary to build the current target.
558558
We need to handle shared_intermediate directory source files as
559559
a special case by copying them to the intermediate directory and
560-
treating them as a genereated sources. Otherwise the Android build
560+
treating them as a generated sources. Otherwise the Android build
561561
rules won't pick them up.
562562
563563
Args:

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit ee6a837

Browse files
committed
gyp: update gyp to 0.6.1
Closes: #2236 PR-URL: #2238 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent 3e7f8cc commit ee6a837

21 files changed

Lines changed: 210 additions & 243 deletions

‎gyp/.flake8‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
2-
max-complexity = 10
2+
max-complexity = 101
33
max-line-length = 88
4-
extend-ignore = E203,C901,E501
4+
extend-ignore = E203# whitespace before ':' to agree with psf/black

‎gyp/.github/workflows/Python_tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
max-parallel: 15
1313
matrix:
1414
os: [macos-latest, ubuntu-latest] # , windows-latest]
15-
python-version: [2.7, 3.6, 3.7, 3.8] # 3.5,
15+
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up Python ${{ matrix.python-version }}

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: node-gyp integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [macos-latest, ubuntu-latest, windows-latest]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- name: Clone gyp-next
14+
uses: actions/checkout@v2
15+
with:
16+
path: gyp-next
17+
- name: Clone nodejs/node-gyp
18+
uses: actions/checkout@v2
19+
with:
20+
repository: nodejs/node-gyp
21+
path: node-gyp
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: 14.x
25+
- uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.9
28+
- name: Install dependencies
29+
run: |
30+
cd node-gyp
31+
npm install --no-progress
32+
- name: Replace gyp in node-gyp
33+
shell: bash
34+
run: |
35+
rm -rf node-gyp/gyp
36+
cp -r gyp-next node-gyp/gyp
37+
- name: Run tests
38+
run: |
39+
cd node-gyp
40+
npm test

‎gyp/.github/workflows/nodejs-windows.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build-windows:
77
runs-on: windows-latest
88
steps:
9-
- name: Clone node-gyp
9+
- name: Clone gyp-next
1010
uses: actions/checkout@v2
1111
with:
1212
path: gyp-next

‎gyp/CHANGELOG.md‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
## [0.6.1] - 2020-10-14
10+
11+
### Fixed
12+
- Correctly rename object files for absolute paths in MSVS generator.
13+
14+
## [0.6.0] - 2020-10-13
15+
16+
### Added
17+
- The Makefile generator will now output shared libraries directly to the product
18+
directory on all platforms (previously only macOS).
19+
20+
## [0.5.0] - 2020-09-30
21+
22+
### Added
23+
- Extended compile_commands_json generator to consider more file extensions than
24+
just `c` and `cc`. `cpp` and `cxx` are now supported.
25+
- Source files with duplicate basenames are now supported.
26+
27+
### Removed
28+
- The `--no-duplicate-basename-check` option was removed.
29+
- The `msvs_enable_marmasm` configuration option was removed in favor of
30+
auto-inclusion of the "marmasm" sections for Windows on ARM.
31+
932
## [0.4.0] - 2020-07-14
1033

1134
### Added
@@ -34,7 +57,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3457
This is the first release of this project, based on https://chromium.googlesource.com/external/gyp
3558
with changes made over the years in Node.js and node-gyp.
3659

37-
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.4.0...HEAD
60+
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.6.1...HEAD
61+
[0.6.1]: https://github.com/nodejs/gyp-next/compare/v0.6.0...v0.6.1
62+
[0.6.0]: https://github.com/nodejs/gyp-next/compare/v0.5.0...v0.6.0
63+
[0.5.0]: https://github.com/nodejs/gyp-next/compare/v0.4.0...v0.5.0
3864
[0.4.0]: https://github.com/nodejs/gyp-next/compare/v0.3.0...v0.4.0
3965
[0.3.0]: https://github.com/nodejs/gyp-next/compare/v0.2.1...v0.3.0
4066
[0.2.1]: https://github.com/nodejs/gyp-next/compare/v0.2.0...v0.2.1

‎gyp/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ GYP can Generate Your Projects.
22
===================================
33

44
Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline.
5+
6+
__gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command:
7+
*`python3 -m pip install gyp-next`

‎gyp/pylib/gyp/MSVSSettings_test.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@ def testConvertToMSBuildSettings_warnings(self):
678678
"MSBuild, index value (21) not in expected range [0, 3)",
679679
"Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to "
680680
"MSBuild, index value (13) not in expected range [0, 3)",
681-
"Warning: while converting VCCLCompilerTool/GeneratePreprocessedFile to "
681+
"Warning: while converting "
682+
"VCCLCompilerTool/GeneratePreprocessedFile to "
682683
"MSBuild, value must be one of [0, 1, 2]; got 14",
683684
"Warning: while converting VCLinkerTool/Driver to "
684685
"MSBuild, index value (10) not in expected range [0, 4)",
@@ -1348,7 +1349,8 @@ def testConvertToMSBuildSettings_actual(self):
13481349
"EmbedManifest": "false",
13491350
"GenerateCatalogFiles": "true",
13501351
"InputResourceManifests": "asfsfdafs",
1351-
"ManifestResourceFile": "$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
1352+
"ManifestResourceFile":
1353+
"$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
13521354
"OutputManifestFile": "$(TargetPath).manifestdfs",
13531355
"RegistrarScriptFile": "sdfsfd",
13541356
"ReplacementsFile": "sdffsd",
@@ -1532,7 +1534,8 @@ def testConvertToMSBuildSettings_actual(self):
15321534
"LinkIncremental": "",
15331535
},
15341536
"ManifestResourceCompile": {
1535-
"ResourceOutputFileName": "$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
1537+
"ResourceOutputFileName":
1538+
"$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
15361539
},
15371540
}
15381541
self.maxDiff=9999# on failure display a long diff

‎gyp/pylib/gyp/__init__.py‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def Load(
6868
params=None,
6969
check=False,
7070
circular_check=True,
71-
duplicate_basename_check=True,
7271
):
7372
"""
7473
Loads one or more specified build files.
@@ -156,7 +155,6 @@ def Load(
156155
generator_input_info,
157156
check,
158157
circular_check,
159-
duplicate_basename_check,
160158
params["parallel"],
161159
params["root_targets"],
162160
)
@@ -431,20 +429,6 @@ def gyp_main(args):
431429
regenerate=False,
432430
help="don't check for circular relationships between files",
433431
)
434-
# --no-duplicate-basename-check disables the check for duplicate basenames
435-
# in a static_library/shared_library project. Visual C++ 2008 generator
436-
# doesn't support this configuration. Libtool on Mac also generates warnings
437-
# when duplicate basenames are passed into Make generator on Mac.
438-
# TODO(yukawa): Remove this option when these legacy generators are
439-
# deprecated.
440-
parser.add_argument(
441-
"--no-duplicate-basename-check",
442-
dest="duplicate_basename_check",
443-
action="store_false",
444-
default=True,
445-
regenerate=False,
446-
help="don't check for duplicate basenames",
447-
)
448432
parser.add_argument(
449433
"--no-parallel",
450434
action="store_true",
@@ -651,7 +635,6 @@ def gyp_main(args):
651635
params,
652636
options.check,
653637
options.circular_check,
654-
options.duplicate_basename_check,
655638
)
656639

657640
# TODO(mark): Pass |data| for now because the generator needs a list of

‎gyp/pylib/gyp/common.py‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,14 @@ class Writer(object):
352352
"""Wrapper around file which only covers the target if it differs."""
353353

354354
def__init__(self):
355-
# On Cygwin remove the "dir" argument because `C:` prefixed paths are treated as relative,
356-
# consequently ending up with current dir "/cygdrive/c/..." being prefixed to those, which was
357-
# obviously a non-existent path, for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
358-
# See https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp for more details
355+
# On Cygwin remove the "dir" argument
356+
# `C:` prefixed paths are treated as relative,
357+
# consequently ending up with current dir "/cygdrive/c/..."
358+
# being prefixed to those, which was
359+
# obviously a non-existent path,
360+
# for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
361+
# For more details see:
362+
# https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp
359363
base_temp_dir=""ifIsCygwin() elseos.path.dirname(filename)
360364
# Pick temporary file.
361365
tmp_fd, self.tmp_path=tempfile.mkstemp(
@@ -391,13 +395,15 @@ def close(self):
391395
# one.
392396
os.unlink(self.tmp_path)
393397
else:
394-
# The new file is different from the old one, or there is no old one.
398+
# The new file is different from the old one,
399+
# or there is no old one.
395400
# Rename the new file to the permanent name.
396401
#
397402
# tempfile.mkstemp uses an overly restrictive mode, resulting in a
398403
# file that can only be read by the owner, regardless of the umask.
399-
# There's no reason to not respect the umask here, which means that
400-
# an extra hoop is required to fetch it and reset the new file's mode.
404+
# There's no reason to not respect the umask here,
405+
# which means that an extra hoop is required
406+
# to fetch it and reset the new file's mode.
401407
#
402408
# No way to get the umask without setting a new one? Set a safe one
403409
# and then set it back to the old value.
@@ -406,8 +412,8 @@ def close(self):
406412
os.chmod(self.tmp_path, 0o666&~umask)
407413
ifsys.platform=="win32"andos.path.exists(filename):
408414
# NOTE: on windows (but not cygwin) rename will not replace an
409-
# existing file, so it must be preceded with a remove. Sadly there
410-
# is no way to make the switch atomic.
415+
# existing file, so it must be preceded with a remove.
416+
# Sadly there is no way to make the switch atomic.
411417
os.remove(filename)
412418
os.rename(self.tmp_path, filename)
413419
exceptException:

‎gyp/pylib/gyp/generator/android.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def WriteSources(self, spec, configs, extra_sources):
557557
These are source files necessary to build the current target.
558558
We need to handle shared_intermediate directory source files as
559559
a special case by copying them to the intermediate directory and
560-
treating them as a genereated sources. Otherwise the Android build
560+
treating them as a generated sources. Otherwise the Android build
561561
rules won't pick them up.
562562
563563
Args:

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit ee6a837

Browse files
committed
gyp: update gyp to 0.6.1
Closes: #2236 PR-URL: #2238 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent 3e7f8cc commit ee6a837

21 files changed

Lines changed: 210 additions & 243 deletions

‎gyp/.flake8‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
2-
max-complexity = 10
2+
max-complexity = 101
33
max-line-length = 88
4-
extend-ignore = E203,C901,E501
4+
extend-ignore = E203# whitespace before ':' to agree with psf/black

‎gyp/.github/workflows/Python_tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
max-parallel: 15
1313
matrix:
1414
os: [macos-latest, ubuntu-latest] # , windows-latest]
15-
python-version: [2.7, 3.6, 3.7, 3.8] # 3.5,
15+
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up Python ${{ matrix.python-version }}

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: node-gyp integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [macos-latest, ubuntu-latest, windows-latest]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- name: Clone gyp-next
14+
uses: actions/checkout@v2
15+
with:
16+
path: gyp-next
17+
- name: Clone nodejs/node-gyp
18+
uses: actions/checkout@v2
19+
with:
20+
repository: nodejs/node-gyp
21+
path: node-gyp
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: 14.x
25+
- uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.9
28+
- name: Install dependencies
29+
run: |
30+
cd node-gyp
31+
npm install --no-progress
32+
- name: Replace gyp in node-gyp
33+
shell: bash
34+
run: |
35+
rm -rf node-gyp/gyp
36+
cp -r gyp-next node-gyp/gyp
37+
- name: Run tests
38+
run: |
39+
cd node-gyp
40+
npm test

‎gyp/.github/workflows/nodejs-windows.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build-windows:
77
runs-on: windows-latest
88
steps:
9-
- name: Clone node-gyp
9+
- name: Clone gyp-next
1010
uses: actions/checkout@v2
1111
with:
1212
path: gyp-next

‎gyp/CHANGELOG.md‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
## [0.6.1] - 2020-10-14
10+
11+
### Fixed
12+
- Correctly rename object files for absolute paths in MSVS generator.
13+
14+
## [0.6.0] - 2020-10-13
15+
16+
### Added
17+
- The Makefile generator will now output shared libraries directly to the product
18+
directory on all platforms (previously only macOS).
19+
20+
## [0.5.0] - 2020-09-30
21+
22+
### Added
23+
- Extended compile_commands_json generator to consider more file extensions than
24+
just `c` and `cc`. `cpp` and `cxx` are now supported.
25+
- Source files with duplicate basenames are now supported.
26+
27+
### Removed
28+
- The `--no-duplicate-basename-check` option was removed.
29+
- The `msvs_enable_marmasm` configuration option was removed in favor of
30+
auto-inclusion of the "marmasm" sections for Windows on ARM.
31+
932
## [0.4.0] - 2020-07-14
1033

1134
### Added
@@ -34,7 +57,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3457
This is the first release of this project, based on https://chromium.googlesource.com/external/gyp
3558
with changes made over the years in Node.js and node-gyp.
3659

37-
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.4.0...HEAD
60+
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.6.1...HEAD
61+
[0.6.1]: https://github.com/nodejs/gyp-next/compare/v0.6.0...v0.6.1
62+
[0.6.0]: https://github.com/nodejs/gyp-next/compare/v0.5.0...v0.6.0
63+
[0.5.0]: https://github.com/nodejs/gyp-next/compare/v0.4.0...v0.5.0
3864
[0.4.0]: https://github.com/nodejs/gyp-next/compare/v0.3.0...v0.4.0
3965
[0.3.0]: https://github.com/nodejs/gyp-next/compare/v0.2.1...v0.3.0
4066
[0.2.1]: https://github.com/nodejs/gyp-next/compare/v0.2.0...v0.2.1

‎gyp/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ GYP can Generate Your Projects.
22
===================================
33

44
Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline.
5+
6+
__gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command:
7+
*`python3 -m pip install gyp-next`

‎gyp/pylib/gyp/MSVSSettings_test.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@ def testConvertToMSBuildSettings_warnings(self):
678678
"MSBuild, index value (21) not in expected range [0, 3)",
679679
"Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to "
680680
"MSBuild, index value (13) not in expected range [0, 3)",
681-
"Warning: while converting VCCLCompilerTool/GeneratePreprocessedFile to "
681+
"Warning: while converting "
682+
"VCCLCompilerTool/GeneratePreprocessedFile to "
682683
"MSBuild, value must be one of [0, 1, 2]; got 14",
683684
"Warning: while converting VCLinkerTool/Driver to "
684685
"MSBuild, index value (10) not in expected range [0, 4)",
@@ -1348,7 +1349,8 @@ def testConvertToMSBuildSettings_actual(self):
13481349
"EmbedManifest": "false",
13491350
"GenerateCatalogFiles": "true",
13501351
"InputResourceManifests": "asfsfdafs",
1351-
"ManifestResourceFile": "$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
1352+
"ManifestResourceFile":
1353+
"$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
13521354
"OutputManifestFile": "$(TargetPath).manifestdfs",
13531355
"RegistrarScriptFile": "sdfsfd",
13541356
"ReplacementsFile": "sdffsd",
@@ -1532,7 +1534,8 @@ def testConvertToMSBuildSettings_actual(self):
15321534
"LinkIncremental": "",
15331535
},
15341536
"ManifestResourceCompile": {
1535-
"ResourceOutputFileName": "$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
1537+
"ResourceOutputFileName":
1538+
"$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
15361539
},
15371540
}
15381541
self.maxDiff=9999# on failure display a long diff

‎gyp/pylib/gyp/__init__.py‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def Load(
6868
params=None,
6969
check=False,
7070
circular_check=True,
71-
duplicate_basename_check=True,
7271
):
7372
"""
7473
Loads one or more specified build files.
@@ -156,7 +155,6 @@ def Load(
156155
generator_input_info,
157156
check,
158157
circular_check,
159-
duplicate_basename_check,
160158
params["parallel"],
161159
params["root_targets"],
162160
)
@@ -431,20 +429,6 @@ def gyp_main(args):
431429
regenerate=False,
432430
help="don't check for circular relationships between files",
433431
)
434-
# --no-duplicate-basename-check disables the check for duplicate basenames
435-
# in a static_library/shared_library project. Visual C++ 2008 generator
436-
# doesn't support this configuration. Libtool on Mac also generates warnings
437-
# when duplicate basenames are passed into Make generator on Mac.
438-
# TODO(yukawa): Remove this option when these legacy generators are
439-
# deprecated.
440-
parser.add_argument(
441-
"--no-duplicate-basename-check",
442-
dest="duplicate_basename_check",
443-
action="store_false",
444-
default=True,
445-
regenerate=False,
446-
help="don't check for duplicate basenames",
447-
)
448432
parser.add_argument(
449433
"--no-parallel",
450434
action="store_true",
@@ -651,7 +635,6 @@ def gyp_main(args):
651635
params,
652636
options.check,
653637
options.circular_check,
654-
options.duplicate_basename_check,
655638
)
656639

657640
# TODO(mark): Pass |data| for now because the generator needs a list of

‎gyp/pylib/gyp/common.py‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,14 @@ class Writer(object):
352352
"""Wrapper around file which only covers the target if it differs."""
353353

354354
def__init__(self):
355-
# On Cygwin remove the "dir" argument because `C:` prefixed paths are treated as relative,
356-
# consequently ending up with current dir "/cygdrive/c/..." being prefixed to those, which was
357-
# obviously a non-existent path, for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
358-
# See https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp for more details
355+
# On Cygwin remove the "dir" argument
356+
# `C:` prefixed paths are treated as relative,
357+
# consequently ending up with current dir "/cygdrive/c/..."
358+
# being prefixed to those, which was
359+
# obviously a non-existent path,
360+
# for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
361+
# For more details see:
362+
# https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp
359363
base_temp_dir=""ifIsCygwin() elseos.path.dirname(filename)
360364
# Pick temporary file.
361365
tmp_fd, self.tmp_path=tempfile.mkstemp(
@@ -391,13 +395,15 @@ def close(self):
391395
# one.
392396
os.unlink(self.tmp_path)
393397
else:
394-
# The new file is different from the old one, or there is no old one.
398+
# The new file is different from the old one,
399+
# or there is no old one.
395400
# Rename the new file to the permanent name.
396401
#
397402
# tempfile.mkstemp uses an overly restrictive mode, resulting in a
398403
# file that can only be read by the owner, regardless of the umask.
399-
# There's no reason to not respect the umask here, which means that
400-
# an extra hoop is required to fetch it and reset the new file's mode.
404+
# There's no reason to not respect the umask here,
405+
# which means that an extra hoop is required
406+
# to fetch it and reset the new file's mode.
401407
#
402408
# No way to get the umask without setting a new one? Set a safe one
403409
# and then set it back to the old value.
@@ -406,8 +412,8 @@ def close(self):
406412
os.chmod(self.tmp_path, 0o666&~umask)
407413
ifsys.platform=="win32"andos.path.exists(filename):
408414
# NOTE: on windows (but not cygwin) rename will not replace an
409-
# existing file, so it must be preceded with a remove. Sadly there
410-
# is no way to make the switch atomic.
415+
# existing file, so it must be preceded with a remove.
416+
# Sadly there is no way to make the switch atomic.
411417
os.remove(filename)
412418
os.rename(self.tmp_path, filename)
413419
exceptException:

‎gyp/pylib/gyp/generator/android.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def WriteSources(self, spec, configs, extra_sources):
557557
These are source files necessary to build the current target.
558558
We need to handle shared_intermediate directory source files as
559559
a special case by copying them to the intermediate directory and
560-
treating them as a genereated sources. Otherwise the Android build
560+
treating them as a generated sources. Otherwise the Android build
561561
rules won't pick them up.
562562
563563
Args:

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Commit ee6a837

Browse files
committed
gyp: update gyp to 0.6.1
Closes: #2236 PR-URL: #2238 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent 3e7f8cc commit ee6a837

21 files changed

Lines changed: 210 additions & 243 deletions

‎gyp/.flake8‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
2-
max-complexity = 10
2+
max-complexity = 101
33
max-line-length = 88
4-
extend-ignore = E203,C901,E501
4+
extend-ignore = E203# whitespace before ':' to agree with psf/black

‎gyp/.github/workflows/Python_tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
max-parallel: 15
1313
matrix:
1414
os: [macos-latest, ubuntu-latest] # , windows-latest]
15-
python-version: [2.7, 3.6, 3.7, 3.8] # 3.5,
15+
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up Python ${{ matrix.python-version }}

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: node-gyp integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [macos-latest, ubuntu-latest, windows-latest]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- name: Clone gyp-next
14+
uses: actions/checkout@v2
15+
with:
16+
path: gyp-next
17+
- name: Clone nodejs/node-gyp
18+
uses: actions/checkout@v2
19+
with:
20+
repository: nodejs/node-gyp
21+
path: node-gyp
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: 14.x
25+
- uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.9
28+
- name: Install dependencies
29+
run: |
30+
cd node-gyp
31+
npm install --no-progress
32+
- name: Replace gyp in node-gyp
33+
shell: bash
34+
run: |
35+
rm -rf node-gyp/gyp
36+
cp -r gyp-next node-gyp/gyp
37+
- name: Run tests
38+
run: |
39+
cd node-gyp
40+
npm test

‎gyp/.github/workflows/nodejs-windows.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build-windows:
77
runs-on: windows-latest
88
steps:
9-
- name: Clone node-gyp
9+
- name: Clone gyp-next
1010
uses: actions/checkout@v2
1111
with:
1212
path: gyp-next

‎gyp/CHANGELOG.md‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
## [0.6.1] - 2020-10-14
10+
11+
### Fixed
12+
- Correctly rename object files for absolute paths in MSVS generator.
13+
14+
## [0.6.0] - 2020-10-13
15+
16+
### Added
17+
- The Makefile generator will now output shared libraries directly to the product
18+
directory on all platforms (previously only macOS).
19+
20+
## [0.5.0] - 2020-09-30
21+
22+
### Added
23+
- Extended compile_commands_json generator to consider more file extensions than
24+
just `c` and `cc`. `cpp` and `cxx` are now supported.
25+
- Source files with duplicate basenames are now supported.
26+
27+
### Removed
28+
- The `--no-duplicate-basename-check` option was removed.
29+
- The `msvs_enable_marmasm` configuration option was removed in favor of
30+
auto-inclusion of the "marmasm" sections for Windows on ARM.
31+
932
## [0.4.0] - 2020-07-14
1033

1134
### Added
@@ -34,7 +57,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3457
This is the first release of this project, based on https://chromium.googlesource.com/external/gyp
3558
with changes made over the years in Node.js and node-gyp.
3659

37-
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.4.0...HEAD
60+
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.6.1...HEAD
61+
[0.6.1]: https://github.com/nodejs/gyp-next/compare/v0.6.0...v0.6.1
62+
[0.6.0]: https://github.com/nodejs/gyp-next/compare/v0.5.0...v0.6.0
63+
[0.5.0]: https://github.com/nodejs/gyp-next/compare/v0.4.0...v0.5.0
3864
[0.4.0]: https://github.com/nodejs/gyp-next/compare/v0.3.0...v0.4.0
3965
[0.3.0]: https://github.com/nodejs/gyp-next/compare/v0.2.1...v0.3.0
4066
[0.2.1]: https://github.com/nodejs/gyp-next/compare/v0.2.0...v0.2.1

‎gyp/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ GYP can Generate Your Projects.
22
===================================
33

44
Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline.
5+
6+
__gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command:
7+
*`python3 -m pip install gyp-next`

‎gyp/pylib/gyp/MSVSSettings_test.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@ def testConvertToMSBuildSettings_warnings(self):
678678
"MSBuild, index value (21) not in expected range [0, 3)",
679679
"Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to "
680680
"MSBuild, index value (13) not in expected range [0, 3)",
681-
"Warning: while converting VCCLCompilerTool/GeneratePreprocessedFile to "
681+
"Warning: while converting "
682+
"VCCLCompilerTool/GeneratePreprocessedFile to "
682683
"MSBuild, value must be one of [0, 1, 2]; got 14",
683684
"Warning: while converting VCLinkerTool/Driver to "
684685
"MSBuild, index value (10) not in expected range [0, 4)",
@@ -1348,7 +1349,8 @@ def testConvertToMSBuildSettings_actual(self):
13481349
"EmbedManifest": "false",
13491350
"GenerateCatalogFiles": "true",
13501351
"InputResourceManifests": "asfsfdafs",
1351-
"ManifestResourceFile": "$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
1352+
"ManifestResourceFile":
1353+
"$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
13521354
"OutputManifestFile": "$(TargetPath).manifestdfs",
13531355
"RegistrarScriptFile": "sdfsfd",
13541356
"ReplacementsFile": "sdffsd",
@@ -1532,7 +1534,8 @@ def testConvertToMSBuildSettings_actual(self):
15321534
"LinkIncremental": "",
15331535
},
15341536
"ManifestResourceCompile": {
1535-
"ResourceOutputFileName": "$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
1537+
"ResourceOutputFileName":
1538+
"$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
15361539
},
15371540
}
15381541
self.maxDiff=9999# on failure display a long diff

‎gyp/pylib/gyp/__init__.py‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def Load(
6868
params=None,
6969
check=False,
7070
circular_check=True,
71-
duplicate_basename_check=True,
7271
):
7372
"""
7473
Loads one or more specified build files.
@@ -156,7 +155,6 @@ def Load(
156155
generator_input_info,
157156
check,
158157
circular_check,
159-
duplicate_basename_check,
160158
params["parallel"],
161159
params["root_targets"],
162160
)
@@ -431,20 +429,6 @@ def gyp_main(args):
431429
regenerate=False,
432430
help="don't check for circular relationships between files",
433431
)
434-
# --no-duplicate-basename-check disables the check for duplicate basenames
435-
# in a static_library/shared_library project. Visual C++ 2008 generator
436-
# doesn't support this configuration. Libtool on Mac also generates warnings
437-
# when duplicate basenames are passed into Make generator on Mac.
438-
# TODO(yukawa): Remove this option when these legacy generators are
439-
# deprecated.
440-
parser.add_argument(
441-
"--no-duplicate-basename-check",
442-
dest="duplicate_basename_check",
443-
action="store_false",
444-
default=True,
445-
regenerate=False,
446-
help="don't check for duplicate basenames",
447-
)
448432
parser.add_argument(
449433
"--no-parallel",
450434
action="store_true",
@@ -651,7 +635,6 @@ def gyp_main(args):
651635
params,
652636
options.check,
653637
options.circular_check,
654-
options.duplicate_basename_check,
655638
)
656639

657640
# TODO(mark): Pass |data| for now because the generator needs a list of

‎gyp/pylib/gyp/common.py‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,14 @@ class Writer(object):
352352
"""Wrapper around file which only covers the target if it differs."""
353353

354354
def__init__(self):
355-
# On Cygwin remove the "dir" argument because `C:` prefixed paths are treated as relative,
356-
# consequently ending up with current dir "/cygdrive/c/..." being prefixed to those, which was
357-
# obviously a non-existent path, for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
358-
# See https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp for more details
355+
# On Cygwin remove the "dir" argument
356+
# `C:` prefixed paths are treated as relative,
357+
# consequently ending up with current dir "/cygdrive/c/..."
358+
# being prefixed to those, which was
359+
# obviously a non-existent path,
360+
# for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
361+
# For more details see:
362+
# https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp
359363
base_temp_dir=""ifIsCygwin() elseos.path.dirname(filename)
360364
# Pick temporary file.
361365
tmp_fd, self.tmp_path=tempfile.mkstemp(
@@ -391,13 +395,15 @@ def close(self):
391395
# one.
392396
os.unlink(self.tmp_path)
393397
else:
394-
# The new file is different from the old one, or there is no old one.
398+
# The new file is different from the old one,
399+
# or there is no old one.
395400
# Rename the new file to the permanent name.
396401
#
397402
# tempfile.mkstemp uses an overly restrictive mode, resulting in a
398403
# file that can only be read by the owner, regardless of the umask.
399-
# There's no reason to not respect the umask here, which means that
400-
# an extra hoop is required to fetch it and reset the new file's mode.
404+
# There's no reason to not respect the umask here,
405+
# which means that an extra hoop is required
406+
# to fetch it and reset the new file's mode.
401407
#
402408
# No way to get the umask without setting a new one? Set a safe one
403409
# and then set it back to the old value.
@@ -406,8 +412,8 @@ def close(self):
406412
os.chmod(self.tmp_path, 0o666&~umask)
407413
ifsys.platform=="win32"andos.path.exists(filename):
408414
# NOTE: on windows (but not cygwin) rename will not replace an
409-
# existing file, so it must be preceded with a remove. Sadly there
410-
# is no way to make the switch atomic.
415+
# existing file, so it must be preceded with a remove.
416+
# Sadly there is no way to make the switch atomic.
411417
os.remove(filename)
412418
os.rename(self.tmp_path, filename)
413419
exceptException:

‎gyp/pylib/gyp/generator/android.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def WriteSources(self, spec, configs, extra_sources):
557557
These are source files necessary to build the current target.
558558
We need to handle shared_intermediate directory source files as
559559
a special case by copying them to the intermediate directory and
560-
treating them as a genereated sources. Otherwise the Android build
560+
treating them as a generated sources. Otherwise the Android build
561561
rules won't pick them up.
562562
563563
Args:

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit ee6a837

Browse files
committed
gyp: update gyp to 0.6.1
Closes: #2236 PR-URL: #2238 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent 3e7f8cc commit ee6a837

21 files changed

Lines changed: 210 additions & 243 deletions

‎gyp/.flake8‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
2-
max-complexity = 10
2+
max-complexity = 101
33
max-line-length = 88
4-
extend-ignore = E203,C901,E501
4+
extend-ignore = E203# whitespace before ':' to agree with psf/black

‎gyp/.github/workflows/Python_tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
max-parallel: 15
1313
matrix:
1414
os: [macos-latest, ubuntu-latest] # , windows-latest]
15-
python-version: [2.7, 3.6, 3.7, 3.8] # 3.5,
15+
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up Python ${{ matrix.python-version }}

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: node-gyp integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [macos-latest, ubuntu-latest, windows-latest]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- name: Clone gyp-next
14+
uses: actions/checkout@v2
15+
with:
16+
path: gyp-next
17+
- name: Clone nodejs/node-gyp
18+
uses: actions/checkout@v2
19+
with:
20+
repository: nodejs/node-gyp
21+
path: node-gyp
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: 14.x
25+
- uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.9
28+
- name: Install dependencies
29+
run: |
30+
cd node-gyp
31+
npm install --no-progress
32+
- name: Replace gyp in node-gyp
33+
shell: bash
34+
run: |
35+
rm -rf node-gyp/gyp
36+
cp -r gyp-next node-gyp/gyp
37+
- name: Run tests
38+
run: |
39+
cd node-gyp
40+
npm test

‎gyp/.github/workflows/nodejs-windows.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build-windows:
77
runs-on: windows-latest
88
steps:
9-
- name: Clone node-gyp
9+
- name: Clone gyp-next
1010
uses: actions/checkout@v2
1111
with:
1212
path: gyp-next

‎gyp/CHANGELOG.md‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
## [0.6.1] - 2020-10-14
10+
11+
### Fixed
12+
- Correctly rename object files for absolute paths in MSVS generator.
13+
14+
## [0.6.0] - 2020-10-13
15+
16+
### Added
17+
- The Makefile generator will now output shared libraries directly to the product
18+
directory on all platforms (previously only macOS).
19+
20+
## [0.5.0] - 2020-09-30
21+
22+
### Added
23+
- Extended compile_commands_json generator to consider more file extensions than
24+
just `c` and `cc`. `cpp` and `cxx` are now supported.
25+
- Source files with duplicate basenames are now supported.
26+
27+
### Removed
28+
- The `--no-duplicate-basename-check` option was removed.
29+
- The `msvs_enable_marmasm` configuration option was removed in favor of
30+
auto-inclusion of the "marmasm" sections for Windows on ARM.
31+
932
## [0.4.0] - 2020-07-14
1033

1134
### Added
@@ -34,7 +57,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3457
This is the first release of this project, based on https://chromium.googlesource.com/external/gyp
3558
with changes made over the years in Node.js and node-gyp.
3659

37-
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.4.0...HEAD
60+
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.6.1...HEAD
61+
[0.6.1]: https://github.com/nodejs/gyp-next/compare/v0.6.0...v0.6.1
62+
[0.6.0]: https://github.com/nodejs/gyp-next/compare/v0.5.0...v0.6.0
63+
[0.5.0]: https://github.com/nodejs/gyp-next/compare/v0.4.0...v0.5.0
3864
[0.4.0]: https://github.com/nodejs/gyp-next/compare/v0.3.0...v0.4.0
3965
[0.3.0]: https://github.com/nodejs/gyp-next/compare/v0.2.1...v0.3.0
4066
[0.2.1]: https://github.com/nodejs/gyp-next/compare/v0.2.0...v0.2.1

‎gyp/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ GYP can Generate Your Projects.
22
===================================
33

44
Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline.
5+
6+
__gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command:
7+
*`python3 -m pip install gyp-next`

‎gyp/pylib/gyp/MSVSSettings_test.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@ def testConvertToMSBuildSettings_warnings(self):
678678
"MSBuild, index value (21) not in expected range [0, 3)",
679679
"Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to "
680680
"MSBuild, index value (13) not in expected range [0, 3)",
681-
"Warning: while converting VCCLCompilerTool/GeneratePreprocessedFile to "
681+
"Warning: while converting "
682+
"VCCLCompilerTool/GeneratePreprocessedFile to "
682683
"MSBuild, value must be one of [0, 1, 2]; got 14",
683684
"Warning: while converting VCLinkerTool/Driver to "
684685
"MSBuild, index value (10) not in expected range [0, 4)",
@@ -1348,7 +1349,8 @@ def testConvertToMSBuildSettings_actual(self):
13481349
"EmbedManifest": "false",
13491350
"GenerateCatalogFiles": "true",
13501351
"InputResourceManifests": "asfsfdafs",
1351-
"ManifestResourceFile": "$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
1352+
"ManifestResourceFile":
1353+
"$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
13521354
"OutputManifestFile": "$(TargetPath).manifestdfs",
13531355
"RegistrarScriptFile": "sdfsfd",
13541356
"ReplacementsFile": "sdffsd",
@@ -1532,7 +1534,8 @@ def testConvertToMSBuildSettings_actual(self):
15321534
"LinkIncremental": "",
15331535
},
15341536
"ManifestResourceCompile": {
1535-
"ResourceOutputFileName": "$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
1537+
"ResourceOutputFileName":
1538+
"$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
15361539
},
15371540
}
15381541
self.maxDiff=9999# on failure display a long diff

‎gyp/pylib/gyp/__init__.py‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def Load(
6868
params=None,
6969
check=False,
7070
circular_check=True,
71-
duplicate_basename_check=True,
7271
):
7372
"""
7473
Loads one or more specified build files.
@@ -156,7 +155,6 @@ def Load(
156155
generator_input_info,
157156
check,
158157
circular_check,
159-
duplicate_basename_check,
160158
params["parallel"],
161159
params["root_targets"],
162160
)
@@ -431,20 +429,6 @@ def gyp_main(args):
431429
regenerate=False,
432430
help="don't check for circular relationships between files",
433431
)
434-
# --no-duplicate-basename-check disables the check for duplicate basenames
435-
# in a static_library/shared_library project. Visual C++ 2008 generator
436-
# doesn't support this configuration. Libtool on Mac also generates warnings
437-
# when duplicate basenames are passed into Make generator on Mac.
438-
# TODO(yukawa): Remove this option when these legacy generators are
439-
# deprecated.
440-
parser.add_argument(
441-
"--no-duplicate-basename-check",
442-
dest="duplicate_basename_check",
443-
action="store_false",
444-
default=True,
445-
regenerate=False,
446-
help="don't check for duplicate basenames",
447-
)
448432
parser.add_argument(
449433
"--no-parallel",
450434
action="store_true",
@@ -651,7 +635,6 @@ def gyp_main(args):
651635
params,
652636
options.check,
653637
options.circular_check,
654-
options.duplicate_basename_check,
655638
)
656639

657640
# TODO(mark): Pass |data| for now because the generator needs a list of

‎gyp/pylib/gyp/common.py‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,14 @@ class Writer(object):
352352
"""Wrapper around file which only covers the target if it differs."""
353353

354354
def__init__(self):
355-
# On Cygwin remove the "dir" argument because `C:` prefixed paths are treated as relative,
356-
# consequently ending up with current dir "/cygdrive/c/..." being prefixed to those, which was
357-
# obviously a non-existent path, for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
358-
# See https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp for more details
355+
# On Cygwin remove the "dir" argument
356+
# `C:` prefixed paths are treated as relative,
357+
# consequently ending up with current dir "/cygdrive/c/..."
358+
# being prefixed to those, which was
359+
# obviously a non-existent path,
360+
# for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
361+
# For more details see:
362+
# https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp
359363
base_temp_dir=""ifIsCygwin() elseos.path.dirname(filename)
360364
# Pick temporary file.
361365
tmp_fd, self.tmp_path=tempfile.mkstemp(
@@ -391,13 +395,15 @@ def close(self):
391395
# one.
392396
os.unlink(self.tmp_path)
393397
else:
394-
# The new file is different from the old one, or there is no old one.
398+
# The new file is different from the old one,
399+
# or there is no old one.
395400
# Rename the new file to the permanent name.
396401
#
397402
# tempfile.mkstemp uses an overly restrictive mode, resulting in a
398403
# file that can only be read by the owner, regardless of the umask.
399-
# There's no reason to not respect the umask here, which means that
400-
# an extra hoop is required to fetch it and reset the new file's mode.
404+
# There's no reason to not respect the umask here,
405+
# which means that an extra hoop is required
406+
# to fetch it and reset the new file's mode.
401407
#
402408
# No way to get the umask without setting a new one? Set a safe one
403409
# and then set it back to the old value.
@@ -406,8 +412,8 @@ def close(self):
406412
os.chmod(self.tmp_path, 0o666&~umask)
407413
ifsys.platform=="win32"andos.path.exists(filename):
408414
# NOTE: on windows (but not cygwin) rename will not replace an
409-
# existing file, so it must be preceded with a remove. Sadly there
410-
# is no way to make the switch atomic.
415+
# existing file, so it must be preceded with a remove.
416+
# Sadly there is no way to make the switch atomic.
411417
os.remove(filename)
412418
os.rename(self.tmp_path, filename)
413419
exceptException:

‎gyp/pylib/gyp/generator/android.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def WriteSources(self, spec, configs, extra_sources):
557557
These are source files necessary to build the current target.
558558
We need to handle shared_intermediate directory source files as
559559
a special case by copying them to the intermediate directory and
560-
treating them as a genereated sources. Otherwise the Android build
560+
treating them as a generated sources. Otherwise the Android build
561561
rules won't pick them up.
562562
563563
Args:

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit ee6a837

Browse files
committed
gyp: update gyp to 0.6.1
Closes: #2236 PR-URL: #2238 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent 3e7f8cc commit ee6a837

21 files changed

Lines changed: 210 additions & 243 deletions

‎gyp/.flake8‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
2-
max-complexity = 10
2+
max-complexity = 101
33
max-line-length = 88
4-
extend-ignore = E203,C901,E501
4+
extend-ignore = E203# whitespace before ':' to agree with psf/black

‎gyp/.github/workflows/Python_tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
max-parallel: 15
1313
matrix:
1414
os: [macos-latest, ubuntu-latest] # , windows-latest]
15-
python-version: [2.7, 3.6, 3.7, 3.8] # 3.5,
15+
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up Python ${{ matrix.python-version }}

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: node-gyp integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [macos-latest, ubuntu-latest, windows-latest]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- name: Clone gyp-next
14+
uses: actions/checkout@v2
15+
with:
16+
path: gyp-next
17+
- name: Clone nodejs/node-gyp
18+
uses: actions/checkout@v2
19+
with:
20+
repository: nodejs/node-gyp
21+
path: node-gyp
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: 14.x
25+
- uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.9
28+
- name: Install dependencies
29+
run: |
30+
cd node-gyp
31+
npm install --no-progress
32+
- name: Replace gyp in node-gyp
33+
shell: bash
34+
run: |
35+
rm -rf node-gyp/gyp
36+
cp -r gyp-next node-gyp/gyp
37+
- name: Run tests
38+
run: |
39+
cd node-gyp
40+
npm test

‎gyp/.github/workflows/nodejs-windows.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build-windows:
77
runs-on: windows-latest
88
steps:
9-
- name: Clone node-gyp
9+
- name: Clone gyp-next
1010
uses: actions/checkout@v2
1111
with:
1212
path: gyp-next

‎gyp/CHANGELOG.md‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
## [0.6.1] - 2020-10-14
10+
11+
### Fixed
12+
- Correctly rename object files for absolute paths in MSVS generator.
13+
14+
## [0.6.0] - 2020-10-13
15+
16+
### Added
17+
- The Makefile generator will now output shared libraries directly to the product
18+
directory on all platforms (previously only macOS).
19+
20+
## [0.5.0] - 2020-09-30
21+
22+
### Added
23+
- Extended compile_commands_json generator to consider more file extensions than
24+
just `c` and `cc`. `cpp` and `cxx` are now supported.
25+
- Source files with duplicate basenames are now supported.
26+
27+
### Removed
28+
- The `--no-duplicate-basename-check` option was removed.
29+
- The `msvs_enable_marmasm` configuration option was removed in favor of
30+
auto-inclusion of the "marmasm" sections for Windows on ARM.
31+
932
## [0.4.0] - 2020-07-14
1033

1134
### Added
@@ -34,7 +57,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3457
This is the first release of this project, based on https://chromium.googlesource.com/external/gyp
3558
with changes made over the years in Node.js and node-gyp.
3659

37-
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.4.0...HEAD
60+
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.6.1...HEAD
61+
[0.6.1]: https://github.com/nodejs/gyp-next/compare/v0.6.0...v0.6.1
62+
[0.6.0]: https://github.com/nodejs/gyp-next/compare/v0.5.0...v0.6.0
63+
[0.5.0]: https://github.com/nodejs/gyp-next/compare/v0.4.0...v0.5.0
3864
[0.4.0]: https://github.com/nodejs/gyp-next/compare/v0.3.0...v0.4.0
3965
[0.3.0]: https://github.com/nodejs/gyp-next/compare/v0.2.1...v0.3.0
4066
[0.2.1]: https://github.com/nodejs/gyp-next/compare/v0.2.0...v0.2.1

‎gyp/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ GYP can Generate Your Projects.
22
===================================
33

44
Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline.
5+
6+
__gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command:
7+
*`python3 -m pip install gyp-next`

‎gyp/pylib/gyp/MSVSSettings_test.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@ def testConvertToMSBuildSettings_warnings(self):
678678
"MSBuild, index value (21) not in expected range [0, 3)",
679679
"Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to "
680680
"MSBuild, index value (13) not in expected range [0, 3)",
681-
"Warning: while converting VCCLCompilerTool/GeneratePreprocessedFile to "
681+
"Warning: while converting "
682+
"VCCLCompilerTool/GeneratePreprocessedFile to "
682683
"MSBuild, value must be one of [0, 1, 2]; got 14",
683684
"Warning: while converting VCLinkerTool/Driver to "
684685
"MSBuild, index value (10) not in expected range [0, 4)",
@@ -1348,7 +1349,8 @@ def testConvertToMSBuildSettings_actual(self):
13481349
"EmbedManifest": "false",
13491350
"GenerateCatalogFiles": "true",
13501351
"InputResourceManifests": "asfsfdafs",
1351-
"ManifestResourceFile": "$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
1352+
"ManifestResourceFile":
1353+
"$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
13521354
"OutputManifestFile": "$(TargetPath).manifestdfs",
13531355
"RegistrarScriptFile": "sdfsfd",
13541356
"ReplacementsFile": "sdffsd",
@@ -1532,7 +1534,8 @@ def testConvertToMSBuildSettings_actual(self):
15321534
"LinkIncremental": "",
15331535
},
15341536
"ManifestResourceCompile": {
1535-
"ResourceOutputFileName": "$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
1537+
"ResourceOutputFileName":
1538+
"$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
15361539
},
15371540
}
15381541
self.maxDiff=9999# on failure display a long diff

‎gyp/pylib/gyp/__init__.py‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def Load(
6868
params=None,
6969
check=False,
7070
circular_check=True,
71-
duplicate_basename_check=True,
7271
):
7372
"""
7473
Loads one or more specified build files.
@@ -156,7 +155,6 @@ def Load(
156155
generator_input_info,
157156
check,
158157
circular_check,
159-
duplicate_basename_check,
160158
params["parallel"],
161159
params["root_targets"],
162160
)
@@ -431,20 +429,6 @@ def gyp_main(args):
431429
regenerate=False,
432430
help="don't check for circular relationships between files",
433431
)
434-
# --no-duplicate-basename-check disables the check for duplicate basenames
435-
# in a static_library/shared_library project. Visual C++ 2008 generator
436-
# doesn't support this configuration. Libtool on Mac also generates warnings
437-
# when duplicate basenames are passed into Make generator on Mac.
438-
# TODO(yukawa): Remove this option when these legacy generators are
439-
# deprecated.
440-
parser.add_argument(
441-
"--no-duplicate-basename-check",
442-
dest="duplicate_basename_check",
443-
action="store_false",
444-
default=True,
445-
regenerate=False,
446-
help="don't check for duplicate basenames",
447-
)
448432
parser.add_argument(
449433
"--no-parallel",
450434
action="store_true",
@@ -651,7 +635,6 @@ def gyp_main(args):
651635
params,
652636
options.check,
653637
options.circular_check,
654-
options.duplicate_basename_check,
655638
)
656639

657640
# TODO(mark): Pass |data| for now because the generator needs a list of

‎gyp/pylib/gyp/common.py‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,14 @@ class Writer(object):
352352
"""Wrapper around file which only covers the target if it differs."""
353353

354354
def__init__(self):
355-
# On Cygwin remove the "dir" argument because `C:` prefixed paths are treated as relative,
356-
# consequently ending up with current dir "/cygdrive/c/..." being prefixed to those, which was
357-
# obviously a non-existent path, for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
358-
# See https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp for more details
355+
# On Cygwin remove the "dir" argument
356+
# `C:` prefixed paths are treated as relative,
357+
# consequently ending up with current dir "/cygdrive/c/..."
358+
# being prefixed to those, which was
359+
# obviously a non-existent path,
360+
# for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
361+
# For more details see:
362+
# https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp
359363
base_temp_dir=""ifIsCygwin() elseos.path.dirname(filename)
360364
# Pick temporary file.
361365
tmp_fd, self.tmp_path=tempfile.mkstemp(
@@ -391,13 +395,15 @@ def close(self):
391395
# one.
392396
os.unlink(self.tmp_path)
393397
else:
394-
# The new file is different from the old one, or there is no old one.
398+
# The new file is different from the old one,
399+
# or there is no old one.
395400
# Rename the new file to the permanent name.
396401
#
397402
# tempfile.mkstemp uses an overly restrictive mode, resulting in a
398403
# file that can only be read by the owner, regardless of the umask.
399-
# There's no reason to not respect the umask here, which means that
400-
# an extra hoop is required to fetch it and reset the new file's mode.
404+
# There's no reason to not respect the umask here,
405+
# which means that an extra hoop is required
406+
# to fetch it and reset the new file's mode.
401407
#
402408
# No way to get the umask without setting a new one? Set a safe one
403409
# and then set it back to the old value.
@@ -406,8 +412,8 @@ def close(self):
406412
os.chmod(self.tmp_path, 0o666&~umask)
407413
ifsys.platform=="win32"andos.path.exists(filename):
408414
# NOTE: on windows (but not cygwin) rename will not replace an
409-
# existing file, so it must be preceded with a remove. Sadly there
410-
# is no way to make the switch atomic.
415+
# existing file, so it must be preceded with a remove.
416+
# Sadly there is no way to make the switch atomic.
411417
os.remove(filename)
412418
os.rename(self.tmp_path, filename)
413419
exceptException:

‎gyp/pylib/gyp/generator/android.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def WriteSources(self, spec, configs, extra_sources):
557557
These are source files necessary to build the current target.
558558
We need to handle shared_intermediate directory source files as
559559
a special case by copying them to the intermediate directory and
560-
treating them as a genereated sources. Otherwise the Android build
560+
treating them as a generated sources. Otherwise the Android build
561561
rules won't pick them up.
562562
563563
Args:

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Commit ee6a837

Browse files
committed
gyp: update gyp to 0.6.1
Closes: #2236 PR-URL: #2238 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent 3e7f8cc commit ee6a837

21 files changed

Lines changed: 210 additions & 243 deletions

‎gyp/.flake8‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
2-
max-complexity = 10
2+
max-complexity = 101
33
max-line-length = 88
4-
extend-ignore = E203,C901,E501
4+
extend-ignore = E203# whitespace before ':' to agree with psf/black

‎gyp/.github/workflows/Python_tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
max-parallel: 15
1313
matrix:
1414
os: [macos-latest, ubuntu-latest] # , windows-latest]
15-
python-version: [2.7, 3.6, 3.7, 3.8] # 3.5,
15+
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up Python ${{ matrix.python-version }}

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: node-gyp integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [macos-latest, ubuntu-latest, windows-latest]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- name: Clone gyp-next
14+
uses: actions/checkout@v2
15+
with:
16+
path: gyp-next
17+
- name: Clone nodejs/node-gyp
18+
uses: actions/checkout@v2
19+
with:
20+
repository: nodejs/node-gyp
21+
path: node-gyp
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: 14.x
25+
- uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.9
28+
- name: Install dependencies
29+
run: |
30+
cd node-gyp
31+
npm install --no-progress
32+
- name: Replace gyp in node-gyp
33+
shell: bash
34+
run: |
35+
rm -rf node-gyp/gyp
36+
cp -r gyp-next node-gyp/gyp
37+
- name: Run tests
38+
run: |
39+
cd node-gyp
40+
npm test

‎gyp/.github/workflows/nodejs-windows.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build-windows:
77
runs-on: windows-latest
88
steps:
9-
- name: Clone node-gyp
9+
- name: Clone gyp-next
1010
uses: actions/checkout@v2
1111
with:
1212
path: gyp-next

‎gyp/CHANGELOG.md‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
## [0.6.1] - 2020-10-14
10+
11+
### Fixed
12+
- Correctly rename object files for absolute paths in MSVS generator.
13+
14+
## [0.6.0] - 2020-10-13
15+
16+
### Added
17+
- The Makefile generator will now output shared libraries directly to the product
18+
directory on all platforms (previously only macOS).
19+
20+
## [0.5.0] - 2020-09-30
21+
22+
### Added
23+
- Extended compile_commands_json generator to consider more file extensions than
24+
just `c` and `cc`. `cpp` and `cxx` are now supported.
25+
- Source files with duplicate basenames are now supported.
26+
27+
### Removed
28+
- The `--no-duplicate-basename-check` option was removed.
29+
- The `msvs_enable_marmasm` configuration option was removed in favor of
30+
auto-inclusion of the "marmasm" sections for Windows on ARM.
31+
932
## [0.4.0] - 2020-07-14
1033

1134
### Added
@@ -34,7 +57,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3457
This is the first release of this project, based on https://chromium.googlesource.com/external/gyp
3558
with changes made over the years in Node.js and node-gyp.
3659

37-
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.4.0...HEAD
60+
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.6.1...HEAD
61+
[0.6.1]: https://github.com/nodejs/gyp-next/compare/v0.6.0...v0.6.1
62+
[0.6.0]: https://github.com/nodejs/gyp-next/compare/v0.5.0...v0.6.0
63+
[0.5.0]: https://github.com/nodejs/gyp-next/compare/v0.4.0...v0.5.0
3864
[0.4.0]: https://github.com/nodejs/gyp-next/compare/v0.3.0...v0.4.0
3965
[0.3.0]: https://github.com/nodejs/gyp-next/compare/v0.2.1...v0.3.0
4066
[0.2.1]: https://github.com/nodejs/gyp-next/compare/v0.2.0...v0.2.1

‎gyp/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ GYP can Generate Your Projects.
22
===================================
33

44
Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline.
5+
6+
__gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command:
7+
*`python3 -m pip install gyp-next`

‎gyp/pylib/gyp/MSVSSettings_test.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@ def testConvertToMSBuildSettings_warnings(self):
678678
"MSBuild, index value (21) not in expected range [0, 3)",
679679
"Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to "
680680
"MSBuild, index value (13) not in expected range [0, 3)",
681-
"Warning: while converting VCCLCompilerTool/GeneratePreprocessedFile to "
681+
"Warning: while converting "
682+
"VCCLCompilerTool/GeneratePreprocessedFile to "
682683
"MSBuild, value must be one of [0, 1, 2]; got 14",
683684
"Warning: while converting VCLinkerTool/Driver to "
684685
"MSBuild, index value (10) not in expected range [0, 4)",
@@ -1348,7 +1349,8 @@ def testConvertToMSBuildSettings_actual(self):
13481349
"EmbedManifest": "false",
13491350
"GenerateCatalogFiles": "true",
13501351
"InputResourceManifests": "asfsfdafs",
1351-
"ManifestResourceFile": "$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
1352+
"ManifestResourceFile":
1353+
"$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
13521354
"OutputManifestFile": "$(TargetPath).manifestdfs",
13531355
"RegistrarScriptFile": "sdfsfd",
13541356
"ReplacementsFile": "sdffsd",
@@ -1532,7 +1534,8 @@ def testConvertToMSBuildSettings_actual(self):
15321534
"LinkIncremental": "",
15331535
},
15341536
"ManifestResourceCompile": {
1535-
"ResourceOutputFileName": "$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
1537+
"ResourceOutputFileName":
1538+
"$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
15361539
},
15371540
}
15381541
self.maxDiff=9999# on failure display a long diff

‎gyp/pylib/gyp/__init__.py‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def Load(
6868
params=None,
6969
check=False,
7070
circular_check=True,
71-
duplicate_basename_check=True,
7271
):
7372
"""
7473
Loads one or more specified build files.
@@ -156,7 +155,6 @@ def Load(
156155
generator_input_info,
157156
check,
158157
circular_check,
159-
duplicate_basename_check,
160158
params["parallel"],
161159
params["root_targets"],
162160
)
@@ -431,20 +429,6 @@ def gyp_main(args):
431429
regenerate=False,
432430
help="don't check for circular relationships between files",
433431
)
434-
# --no-duplicate-basename-check disables the check for duplicate basenames
435-
# in a static_library/shared_library project. Visual C++ 2008 generator
436-
# doesn't support this configuration. Libtool on Mac also generates warnings
437-
# when duplicate basenames are passed into Make generator on Mac.
438-
# TODO(yukawa): Remove this option when these legacy generators are
439-
# deprecated.
440-
parser.add_argument(
441-
"--no-duplicate-basename-check",
442-
dest="duplicate_basename_check",
443-
action="store_false",
444-
default=True,
445-
regenerate=False,
446-
help="don't check for duplicate basenames",
447-
)
448432
parser.add_argument(
449433
"--no-parallel",
450434
action="store_true",
@@ -651,7 +635,6 @@ def gyp_main(args):
651635
params,
652636
options.check,
653637
options.circular_check,
654-
options.duplicate_basename_check,
655638
)
656639

657640
# TODO(mark): Pass |data| for now because the generator needs a list of

‎gyp/pylib/gyp/common.py‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,14 @@ class Writer(object):
352352
"""Wrapper around file which only covers the target if it differs."""
353353

354354
def__init__(self):
355-
# On Cygwin remove the "dir" argument because `C:` prefixed paths are treated as relative,
356-
# consequently ending up with current dir "/cygdrive/c/..." being prefixed to those, which was
357-
# obviously a non-existent path, for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
358-
# See https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp for more details
355+
# On Cygwin remove the "dir" argument
356+
# `C:` prefixed paths are treated as relative,
357+
# consequently ending up with current dir "/cygdrive/c/..."
358+
# being prefixed to those, which was
359+
# obviously a non-existent path,
360+
# for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
361+
# For more details see:
362+
# https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp
359363
base_temp_dir=""ifIsCygwin() elseos.path.dirname(filename)
360364
# Pick temporary file.
361365
tmp_fd, self.tmp_path=tempfile.mkstemp(
@@ -391,13 +395,15 @@ def close(self):
391395
# one.
392396
os.unlink(self.tmp_path)
393397
else:
394-
# The new file is different from the old one, or there is no old one.
398+
# The new file is different from the old one,
399+
# or there is no old one.
395400
# Rename the new file to the permanent name.
396401
#
397402
# tempfile.mkstemp uses an overly restrictive mode, resulting in a
398403
# file that can only be read by the owner, regardless of the umask.
399-
# There's no reason to not respect the umask here, which means that
400-
# an extra hoop is required to fetch it and reset the new file's mode.
404+
# There's no reason to not respect the umask here,
405+
# which means that an extra hoop is required
406+
# to fetch it and reset the new file's mode.
401407
#
402408
# No way to get the umask without setting a new one? Set a safe one
403409
# and then set it back to the old value.
@@ -406,8 +412,8 @@ def close(self):
406412
os.chmod(self.tmp_path, 0o666&~umask)
407413
ifsys.platform=="win32"andos.path.exists(filename):
408414
# NOTE: on windows (but not cygwin) rename will not replace an
409-
# existing file, so it must be preceded with a remove. Sadly there
410-
# is no way to make the switch atomic.
415+
# existing file, so it must be preceded with a remove.
416+
# Sadly there is no way to make the switch atomic.
411417
os.remove(filename)
412418
os.rename(self.tmp_path, filename)
413419
exceptException:

‎gyp/pylib/gyp/generator/android.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def WriteSources(self, spec, configs, extra_sources):
557557
These are source files necessary to build the current target.
558558
We need to handle shared_intermediate directory source files as
559559
a special case by copying them to the intermediate directory and
560-
treating them as a genereated sources. Otherwise the Android build
560+
treating them as a generated sources. Otherwise the Android build
561561
rules won't pick them up.
562562
563563
Args:

0 commit comments

Comments
 (0)