Skip to content

Commit

Permalink
feat(gyp): update gyp to v0.9.1 (#2402)
Browse files Browse the repository at this point in the history
  • Loading branch information
gengjiawen committed May 28, 2021
1 parent 1423670 commit 814b1b0
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 17 deletions.
2 changes: 1 addition & 1 deletion gyp/.github/workflows/release-please.yml
@@ -1,7 +1,7 @@
on:
push:
branches:
- master
- main

name: release-please
jobs:
Expand Down
20 changes: 20 additions & 0 deletions gyp/CHANGELOG.md
@@ -1,5 +1,25 @@
# Changelog

### [0.9.1](https://www.github.com/nodejs/gyp-next/compare/v0.9.0...v0.9.1) (2021-05-14)


### Bug Fixes

* py lint ([3b6a8ee](https://www.github.com/nodejs/gyp-next/commit/3b6a8ee7a66193a8a6867eba9e1d2b70bdf04402))

## [0.9.0](https://www.github.com/nodejs/gyp-next/compare/v0.8.1...v0.9.0) (2021-05-13)


### Features

* 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))


### Bug Fixes

* msvs.py: remove overindentation ([#102](https://www.github.com/nodejs/gyp-next/issues/102)) ([3f83e99](https://www.github.com/nodejs/gyp-next/commit/3f83e99056d004d9579ceb786e06b624ddc36529))
* 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))

### [0.8.1](https://www.github.com/nodejs/gyp-next/compare/v0.8.0...v0.8.1) (2021-02-18)


Expand Down
4 changes: 2 additions & 2 deletions gyp/CODE_OF_CONDUCT.md
@@ -1,4 +1,4 @@
# Code of Conduct

* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md)
* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/master/Moderation-Policy.md)
* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md)
* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/HEAD/Moderation-Policy.md)
2 changes: 1 addition & 1 deletion gyp/CONTRIBUTING.md
Expand Up @@ -2,7 +2,7 @@

## Code of Conduct

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

<a id="developers-certificate-of-origin"></a>
## Developer's Certificate of Origin 1.1
Expand Down
2 changes: 1 addition & 1 deletion gyp/pylib/gyp/generator/make.py
Expand Up @@ -319,7 +319,7 @@ def CalculateGeneratorInputInfo(params):
CXX.host ?= %(CXX.host)s
CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
LINK.host ?= %(LINK.host)s
LDFLAGS.host ?=
LDFLAGS.host ?= $(LDFLAGS_host)
AR.host ?= %(AR.host)s
# Define a dir function that can handle spaces.
Expand Down
6 changes: 5 additions & 1 deletion gyp/pylib/gyp/generator/ninja.py
Expand Up @@ -1417,7 +1417,11 @@ def WriteLinkForArch(
is_executable = spec["type"] == "executable"
# The ldflags config key is not used on mac or win. On those platforms
# linker flags are set via xcode_settings and msvs_settings, respectively.
env_ldflags = os.environ.get("LDFLAGS", "").split()
if self.toolset == "target":
env_ldflags = os.environ.get("LDFLAGS", "").split()
elif self.toolset == "host":
env_ldflags = os.environ.get("LDFLAGS_host", "").split()

if self.flavor == "mac":
ldflags = self.xcode_settings.GetLdflags(
config_name,
Expand Down
19 changes: 11 additions & 8 deletions gyp/pylib/gyp/xcodeproj_file.py
Expand Up @@ -138,7 +138,9 @@
"""

import gyp.common
from functools import cmp_to_key
import hashlib
from operator import attrgetter
import posixpath
import re
import struct
Expand Down Expand Up @@ -423,6 +425,8 @@ def _HashUpdate(hash, data):
"""

hash.update(struct.pack(">i", len(data)))
if isinstance(data, str):
data = data.encode("utf-8")
hash.update(data)

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

def SortGroup(self):
self._properties["children"] = sorted(
self._properties["children"], cmp=lambda x, y: x.Compare(y)
self._properties["children"], key=cmp_to_key(lambda x, y: x.Compare(y))
)

# Recurse.
Expand Down Expand Up @@ -2891,7 +2895,7 @@ def SortGroups(self):
# according to their defined order.
self._properties["mainGroup"]._properties["children"] = sorted(
self._properties["mainGroup"]._properties["children"],
cmp=lambda x, y: x.CompareRootGroup(y),
key=cmp_to_key(lambda x, y: x.CompareRootGroup(y)),
)

# Sort everything else by putting group before files, and going
Expand Down Expand Up @@ -2986,9 +2990,7 @@ def AddOrGetProjectReference(self, other_pbxproject):
# Xcode seems to sort this list case-insensitively
self._properties["projectReferences"] = sorted(
self._properties["projectReferences"],
cmp=lambda x, y: cmp(
x["ProjectRef"].Name().lower(), y["ProjectRef"].Name().lower()
),
key=lambda x: x["ProjectRef"].Name().lower
)
else:
# The link already exists. Pull out the relevnt data.
Expand Down Expand Up @@ -3120,7 +3122,8 @@ def CompareProducts(x, y, remote_products):
product_group = ref_dict["ProductGroup"]
product_group._properties["children"] = sorted(
product_group._properties["children"],
cmp=lambda x, y, rp=remote_products: CompareProducts(x, y, rp),
key=cmp_to_key(
lambda x, y, rp=remote_products: CompareProducts(x, y, rp)),
)


Expand Down Expand Up @@ -3155,7 +3158,7 @@ def Print(self, file=sys.stdout):
else:
self._XCPrint(file, 0, "{\n")
for property, value in sorted(
self._properties.items(), cmp=lambda x, y: cmp(x, y)
self._properties.items()
):
if property == "objects":
self._PrintObjects(file)
Expand Down Expand Up @@ -3183,7 +3186,7 @@ def _PrintObjects(self, file):
self._XCPrint(file, 0, "\n")
self._XCPrint(file, 0, "/* Begin " + class_name + " section */\n")
for object in sorted(
objects_by_class[class_name], cmp=lambda x, y: cmp(x.id, y.id)
objects_by_class[class_name], key=attrgetter("id")
):
object.Print(file)
self._XCPrint(file, 0, "/* End " + class_name + " section */\n")
Expand Down
2 changes: 1 addition & 1 deletion gyp/setup.py
Expand Up @@ -15,7 +15,7 @@

setup(
name="gyp-next",
version="0.8.1",
version="0.9.1",
description="A fork of the GYP build system for use in the Node.js projects",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion gyp/tools/emacs/gyp-tests.el
Expand Up @@ -30,7 +30,7 @@
"For the purposes of face comparison, we're not interested in the
differences between certain faces. For example, the difference between
font-lock-comment-delimiter and font-lock-comment-face."
(case face
(cl-case face
((font-lock-comment-delimiter-face) font-lock-comment-face)
(t face)))

Expand Down
2 changes: 1 addition & 1 deletion gyp/tools/emacs/gyp.el
Expand Up @@ -213,7 +213,7 @@
string-start)
(setq string-start (gyp-parse-to limit))
(if string-start
(setq group (case (gyp-section-at-point)
(setq group (cl-case (gyp-section-at-point)
('dependencies 1)
('variables 2)
('conditions 2)
Expand Down

0 comments on commit 814b1b0

Please sign in to comment.