Skip to content

Commit 814b1b0

Browse files
committed
feat(gyp): update gyp to v0.9.1 (#2402)
1 parent 1423670 commit 814b1b0

File tree

10 files changed

+44
-17
lines changed

10 files changed

+44
-17
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
push:
33
branches:
4-
- master
4+
- main
55

66
name: release-please
77
jobs:

gyp/CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
### [0.9.1](https://www.github.com/nodejs/gyp-next/compare/v0.9.0...v0.9.1) (2021-05-14)
4+
5+
6+
### Bug Fixes
7+
8+
* py lint ([3b6a8ee](https://www.github.com/nodejs/gyp-next/commit/3b6a8ee7a66193a8a6867eba9e1d2b70bdf04402))
9+
10+
## [0.9.0](https://www.github.com/nodejs/gyp-next/compare/v0.8.1...v0.9.0) (2021-05-13)
11+
12+
13+
### Features
14+
15+
* use LDFLAGS_host for host toolset ([#98](https://www.github.com/nodejs/gyp-next/issues/98)) ([bea5c7b](https://www.github.com/nodejs/gyp-next/commit/bea5c7bd67d6ad32acbdce79767a5481c70675a2))
16+
17+
18+
### Bug Fixes
19+
20+
* msvs.py: remove overindentation ([#102](https://www.github.com/nodejs/gyp-next/issues/102)) ([3f83e99](https://www.github.com/nodejs/gyp-next/commit/3f83e99056d004d9579ceb786e06b624ddc36529))
21+
* update gyp.el to change case to cl-case ([#93](https://www.github.com/nodejs/gyp-next/issues/93)) ([13d5b66](https://www.github.com/nodejs/gyp-next/commit/13d5b66aab35985af9c2fb1174fdc6e1c1407ecc))
22+
323
### [0.8.1](https://www.github.com/nodejs/gyp-next/compare/v0.8.0...v0.8.1) (2021-02-18)
424

525

gyp/CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Code of Conduct
22

3-
* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md)
4-
* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/master/Moderation-Policy.md)
3+
* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md)
4+
* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/HEAD/Moderation-Policy.md)

gyp/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Code of Conduct
44

5-
This project is bound to the [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md).
5+
This project is bound to the [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md).
66

77
<a id="developers-certificate-of-origin"></a>
88
## Developer's Certificate of Origin 1.1

gyp/pylib/gyp/generator/make.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def CalculateGeneratorInputInfo(params):
319319
CXX.host ?= %(CXX.host)s
320320
CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
321321
LINK.host ?= %(LINK.host)s
322-
LDFLAGS.host ?=
322+
LDFLAGS.host ?= $(LDFLAGS_host)
323323
AR.host ?= %(AR.host)s
324324
325325
# Define a dir function that can handle spaces.

gyp/pylib/gyp/generator/ninja.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,11 @@ def WriteLinkForArch(
14171417
is_executable = spec["type"] == "executable"
14181418
# The ldflags config key is not used on mac or win. On those platforms
14191419
# linker flags are set via xcode_settings and msvs_settings, respectively.
1420-
env_ldflags = os.environ.get("LDFLAGS", "").split()
1420+
if self.toolset == "target":
1421+
env_ldflags = os.environ.get("LDFLAGS", "").split()
1422+
elif self.toolset == "host":
1423+
env_ldflags = os.environ.get("LDFLAGS_host", "").split()
1424+
14211425
if self.flavor == "mac":
14221426
ldflags = self.xcode_settings.GetLdflags(
14231427
config_name,

gyp/pylib/gyp/xcodeproj_file.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@
138138
"""
139139

140140
import gyp.common
141+
from functools import cmp_to_key
141142
import hashlib
143+
from operator import attrgetter
142144
import posixpath
143145
import re
144146
import struct
@@ -423,6 +425,8 @@ def _HashUpdate(hash, data):
423425
"""
424426

425427
hash.update(struct.pack(">i", len(data)))
428+
if isinstance(data, str):
429+
data = data.encode("utf-8")
426430
hash.update(data)
427431

428432
if seed_hash is None:
@@ -1483,7 +1487,7 @@ def TakeOverOnlyChild(self, recurse=False):
14831487

14841488
def SortGroup(self):
14851489
self._properties["children"] = sorted(
1486-
self._properties["children"], cmp=lambda x, y: x.Compare(y)
1490+
self._properties["children"], key=cmp_to_key(lambda x, y: x.Compare(y))
14871491
)
14881492

14891493
# Recurse.
@@ -2891,7 +2895,7 @@ def SortGroups(self):
28912895
# according to their defined order.
28922896
self._properties["mainGroup"]._properties["children"] = sorted(
28932897
self._properties["mainGroup"]._properties["children"],
2894-
cmp=lambda x, y: x.CompareRootGroup(y),
2898+
key=cmp_to_key(lambda x, y: x.CompareRootGroup(y)),
28952899
)
28962900

28972901
# Sort everything else by putting group before files, and going
@@ -2986,9 +2990,7 @@ def AddOrGetProjectReference(self, other_pbxproject):
29862990
# Xcode seems to sort this list case-insensitively
29872991
self._properties["projectReferences"] = sorted(
29882992
self._properties["projectReferences"],
2989-
cmp=lambda x, y: cmp(
2990-
x["ProjectRef"].Name().lower(), y["ProjectRef"].Name().lower()
2991-
),
2993+
key=lambda x: x["ProjectRef"].Name().lower
29922994
)
29932995
else:
29942996
# The link already exists. Pull out the relevnt data.
@@ -3120,7 +3122,8 @@ def CompareProducts(x, y, remote_products):
31203122
product_group = ref_dict["ProductGroup"]
31213123
product_group._properties["children"] = sorted(
31223124
product_group._properties["children"],
3123-
cmp=lambda x, y, rp=remote_products: CompareProducts(x, y, rp),
3125+
key=cmp_to_key(
3126+
lambda x, y, rp=remote_products: CompareProducts(x, y, rp)),
31243127
)
31253128

31263129

@@ -3155,7 +3158,7 @@ def Print(self, file=sys.stdout):
31553158
else:
31563159
self._XCPrint(file, 0, "{\n")
31573160
for property, value in sorted(
3158-
self._properties.items(), cmp=lambda x, y: cmp(x, y)
3161+
self._properties.items()
31593162
):
31603163
if property == "objects":
31613164
self._PrintObjects(file)
@@ -3183,7 +3186,7 @@ def _PrintObjects(self, file):
31833186
self._XCPrint(file, 0, "\n")
31843187
self._XCPrint(file, 0, "/* Begin " + class_name + " section */\n")
31853188
for object in sorted(
3186-
objects_by_class[class_name], cmp=lambda x, y: cmp(x.id, y.id)
3189+
objects_by_class[class_name], key=attrgetter("id")
31873190
):
31883191
object.Print(file)
31893192
self._XCPrint(file, 0, "/* End " + class_name + " section */\n")

gyp/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
setup(
1717
name="gyp-next",
18-
version="0.8.1",
18+
version="0.9.1",
1919
description="A fork of the GYP build system for use in the Node.js projects",
2020
long_description=long_description,
2121
long_description_content_type="text/markdown",

gyp/tools/emacs/gyp-tests.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"For the purposes of face comparison, we're not interested in the
3131
differences between certain faces. For example, the difference between
3232
font-lock-comment-delimiter and font-lock-comment-face."
33-
(case face
33+
(cl-case face
3434
((font-lock-comment-delimiter-face) font-lock-comment-face)
3535
(t face)))
3636

gyp/tools/emacs/gyp.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
string-start)
214214
(setq string-start (gyp-parse-to limit))
215215
(if string-start
216-
(setq group (case (gyp-section-at-point)
216+
(setq group (cl-case (gyp-section-at-point)
217217
('dependencies 1)
218218
('variables 2)
219219
('conditions 2)

0 commit comments

Comments
 (0)