| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f959cb3 commit 7d35fa7
54 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,4 @@ | |||
| 1 | 1 | # TODO: Enable os: windows-latest | |
| 2 | - # TODO: Enable python-version: 3.5 | ||
| 3 | 2 | # TODO: Enable pytest --doctest-modules | |
| 4 | 3 | ||
| 5 | 4 | name: Python_tests | |
@@ -9,10 +8,10 @@ jobs: | |||
| 9 | 8 | runs-on: ${{ matrix.os }} | |
| 10 | 9 | strategy: | |
| 11 | 10 | fail-fast: false | |
| 12 | - max-parallel: 15 | ||
| 11 | + max-parallel: 8 | ||
| 13 | 12 | matrix: | |
| 14 | 13 | os: [macos-latest, ubuntu-latest] # , windows-latest] | |
| 15 | - python-version: [2.7, 3.6, 3.7, 3.8, 3.9] | ||
| 14 | + python-version: [3.6, 3.7, 3.8, 3.9] | ||
| 16 | 15 | steps: | |
| 17 | 16 | - uses: actions/checkout@v2 | |
| 18 | 17 | - name: Set up Python ${{ matrix.python-version }} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,7 @@ jobs: | |||
| 19 | 19 | with: | |
| 20 | 20 | repository: nodejs/node-gyp | |
| 21 | 21 | path: node-gyp | |
| 22 | - - uses: actions/setup-node@v1 | ||
| 22 | + - uses: actions/setup-node@v2 | ||
| 23 | 23 | with: | |
| 24 | 24 | node-version: 14.x | |
| 25 | 25 | - uses: actions/setup-python@v2 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,14 +1,14 @@ | |||
| 1 | 1 | on: | |
| 2 | 2 | push: | |
| 3 | 3 | branches: | |
| 4 | - - master | ||
| 4 | + - main | ||
| 5 | 5 | ||
| 6 | 6 | name: release-please | |
| 7 | 7 | jobs: | |
| 8 | 8 | release-please: | |
| 9 | 9 | runs-on: ubuntu-latest | |
| 10 | 10 | steps: | |
| 11 | - - uses: GoogleCloudPlatform/release-please-action@v2.5.6 | ||
| 11 | + - uses: GoogleCloudPlatform/release-please-action@v2 | ||
| 12 | 12 | with: | |
| 13 | 13 | token: ${{ secrets.GITHUB_TOKEN }} | |
| 14 | 14 | release-type: python | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,48 @@ | |||
| 1 | 1 | # Changelog | |
| 2 | 2 | ||
| 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 | + | ||
| 23 | + ### [0.8.1](https://www.github.com/nodejs/gyp-next/compare/v0.8.0...v0.8.1) (2021-02-18) | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + ### Bug Fixes | ||
| 27 | + | ||
| 28 | + * update shebang lines from python to python3 ([#94](https://www.github.com/nodejs/gyp-next/issues/94)) ([a1b0d41](https://www.github.com/nodejs/gyp-next/commit/a1b0d4171a8049a4ab7a614202063dec332f2df4)) | ||
| 29 | + | ||
| 30 | + ## [0.8.0](https://www.github.com/nodejs/gyp-next/compare/v0.7.0...v0.8.0) (2021-01-15) | ||
| 31 | + | ||
| 32 | + | ||
| 33 | + ### ⚠ BREAKING CHANGES | ||
| 34 | + | ||
| 35 | + * remove support for Python 2 | ||
| 36 | + | ||
| 37 | + ### Bug Fixes | ||
| 38 | + | ||
| 39 | + * revert posix build job ([#86](https://www.github.com/nodejs/gyp-next/issues/86)) ([39dc34f](https://www.github.com/nodejs/gyp-next/commit/39dc34f0799c074624005fb9bbccf6e028607f9d)) | ||
| 40 | + | ||
| 41 | + | ||
| 42 | + ### gyp | ||
| 43 | + | ||
| 44 | + * Remove support for Python 2 ([#88](https://www.github.com/nodejs/gyp-next/issues/88)) ([22e4654](https://www.github.com/nodejs/gyp-next/commit/22e465426fd892403c95534229af819a99c3f8dc)) | ||
| 45 | + | ||
| 3 | 46 | ## [0.7.0](https://www.github.com/nodejs/gyp-next/compare/v0.6.2...v0.7.0) (2020-12-17) | |
| 4 | 47 | ||
| 5 | 48 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | 1 | # Code of Conduct | |
| 2 | 2 | ||
| 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) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | 3 | ## Code of Conduct | |
| 4 | 4 | ||
| 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). | ||
| 6 | 6 | ||
| 7 | 7 | <a id="developers-certificate-of-origin"></a> | |
| 8 | 8 | ## Developer's Certificate of Origin 1.1 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - #!/usr/bin/env python | ||
| 1 | + #!/usr/bin/env python3 | ||
| 2 | 2 | ||
| 3 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. | |
| 4 | 4 | # Use of this source code is governed by a BSD-style license that can be | |
@@ -8,19 +8,15 @@ | |||
| 8 | 8 | import sys | |
| 9 | 9 | import subprocess | |
| 10 | 10 | ||
| 11 | - PY3 = bytes != str | ||
| 12 | - | ||
| 13 | 11 | ||
| 14 | 12 | def IsCygwin(): | |
| 15 | 13 | # Function copied from pylib/gyp/common.py | |
| 16 | 14 | try: | |
| 17 | 15 | out = subprocess.Popen( | |
| 18 | 16 | "uname", stdout=subprocess.PIPE, stderr=subprocess.STDOUT | |
| 19 | 17 | ) | |
| 20 | - stdout, stderr = out.communicate() | ||
| 21 | - if PY3: | ||
| 22 | - stdout = stdout.decode("utf-8") | ||
| 23 | - return "CYGWIN" in str(stdout) | ||
| 18 | + stdout, _ = out.communicate() | ||
| 19 | + return "CYGWIN" in stdout.decode("utf-8") | ||
| 24 | 20 | except Exception: | |
| 25 | 21 | return False | |
| 26 | 22 | ||
@@ -33,9 +29,7 @@ def UnixifyPath(path): | |||
| 33 | 29 | ["cygpath", "-u", path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT | |
| 34 | 30 | ) | |
| 35 | 31 | stdout, _ = out.communicate() | |
| 36 | - if PY3: | ||
| 37 | - stdout = stdout.decode("utf-8") | ||
| 38 | - return str(stdout) | ||
| 32 | + return stdout.decode("utf-8") | ||
| 39 | 33 | except Exception: | |
| 40 | 34 | return path | |
| 41 | 35 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,12 +11,9 @@ | |||
| 11 | 11 | ||
| 12 | 12 | import gyp.common | |
| 13 | 13 | ||
| 14 | - try: | ||
| 15 | - cmp | ||
| 16 | - except NameError: | ||
| 17 | 14 | ||
| 18 | - def cmp(x, y): | ||
| 19 | - return (x > y) - (x < y) | ||
| 15 | + def cmp(x, y): | ||
| 16 | + return (x > y) - (x < y) | ||
| 20 | 17 | ||
| 21 | 18 | ||
| 22 | 19 | # Initialize random number generator | |
@@ -69,7 +66,7 @@ def MakeGuid(name, seed="msvs_new"): | |||
| 69 | 66 | # ------------------------------------------------------------------------------ | |
| 70 | 67 | ||
| 71 | 68 | ||
| 72 | - class MSVSSolutionEntry(object): | ||
| 69 | + class MSVSSolutionEntry: | ||
| 73 | 70 | def __cmp__(self, other): | |
| 74 | 71 | # Sort by name then guid (so things are in order on vs2008). | |
| 75 | 72 | return cmp((self.name, self.get_guid()), (other.name, other.get_guid())) | |
@@ -190,7 +187,7 @@ def set_msbuild_toolset(self, msbuild_toolset): | |||
| 190 | 187 | # ------------------------------------------------------------------------------ | |
| 191 | 188 | ||
| 192 | 189 | ||
| 193 | - class MSVSSolution(object): | ||
| 190 | + class MSVSSolution: | ||
| 194 | 191 | """Visual Studio solution.""" | |
| 195 | 192 | ||
| 196 | 193 | def __init__( | |
@@ -292,14 +289,14 @@ def Write(self, writer=gyp.common.WriteOnDiff): | |||
| 292 | 289 | if e.items: | |
| 293 | 290 | f.write("\tProjectSection(SolutionItems) = preProject\r\n") | |
| 294 | 291 | for i in e.items: | |
| 295 | - f.write("\t\t%s = %s\r\n" % (i, i)) | ||
| 292 | + f.write(f"\t\t{i} = {i}\r\n") | ||
| 296 | 293 | f.write("\tEndProjectSection\r\n") | |
| 297 | 294 | ||
| 298 | 295 | if isinstance(e, MSVSProject): | |
| 299 | 296 | if e.dependencies: | |
| 300 | 297 | f.write("\tProjectSection(ProjectDependencies) = postProject\r\n") | |
| 301 | 298 | for d in e.dependencies: | |
| 302 | - f.write("\t\t%s = %s\r\n" % (d.get_guid(), d.get_guid())) | ||
| 299 | + f.write(f"\t\t{d.get_guid()} = {d.get_guid()}\r\n") | ||
| 303 | 300 | f.write("\tEndProjectSection\r\n") | |
| 304 | 301 | ||
| 305 | 302 | f.write("EndProject\r\n") | |
@@ -310,7 +307,7 @@ def Write(self, writer=gyp.common.WriteOnDiff): | |||
| 310 | 307 | # Configurations (variants) | |
| 311 | 308 | f.write("\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n") | |
| 312 | 309 | for v in self.variants: | |
| 313 | - f.write("\t\t%s = %s\r\n" % (v, v)) | ||
| 310 | + f.write(f"\t\t{v} = {v}\r\n") | ||
| 314 | 311 | f.write("\tEndGlobalSection\r\n") | |
| 315 | 312 | ||
| 316 | 313 | # Sort config guids for easier diffing of solution changes. | |
@@ -362,7 +359,7 @@ def Write(self, writer=gyp.common.WriteOnDiff): | |||
| 362 | 359 | if not isinstance(e, MSVSFolder): | |
| 363 | 360 | continue # Does not apply to projects, only folders | |
| 364 | 361 | for subentry in e.entries: | |
| 365 | - f.write("\t\t%s = %s\r\n" % (subentry.get_guid(), e.get_guid())) | ||
| 362 | + f.write(f"\t\t{subentry.get_guid()} = {e.get_guid()}\r\n") | ||
| 366 | 363 | f.write("\tEndGlobalSection\r\n") | |
| 367 | 364 | ||
| 368 | 365 | f.write("EndGlobal\r\n") | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,7 @@ | |||
| 9 | 9 | # ------------------------------------------------------------------------------ | |
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | - class Tool(object): | ||
| 12 | + class Tool: | ||
| 13 | 13 | """Visual Studio tool.""" | |
| 14 | 14 | ||
| 15 | 15 | def __init__(self, name, attrs=None): | |
@@ -31,7 +31,7 @@ def _GetSpecification(self): | |||
| 31 | 31 | return ["Tool", self._attrs] | |
| 32 | 32 | ||
| 33 | 33 | ||
| 34 | - class Filter(object): | ||
| 34 | + class Filter: | ||
| 35 | 35 | """Visual Studio filter - that is, a virtual folder.""" | |
| 36 | 36 | ||
| 37 | 37 | def __init__(self, name, contents=None): | |
@@ -48,7 +48,7 @@ def __init__(self, name, contents=None): | |||
| 48 | 48 | # ------------------------------------------------------------------------------ | |
| 49 | 49 | ||
| 50 | 50 | ||
| 51 | - class Writer(object): | ||
| 51 | + class Writer: | ||
| 52 | 52 | """Visual Studio XML project writer.""" | |
| 53 | 53 | ||
| 54 | 54 | def __init__(self, project_path, version, name, guid=None, platforms=None): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,12 +14,8 @@ | |||
| 14 | 14 | MSBuild install directory, e.g. c:\Program Files (x86)\MSBuild | |
| 15 | 15 | """ | |
| 16 | 16 | ||
| 17 | - from __future__ import print_function | ||
| 18 | - | ||
| 19 | - from gyp import string_types | ||
| 20 | - | ||
| 21 | - import sys | ||
| 22 | 17 | import re | |
| 18 | + import sys | ||
| 23 | 19 | ||
| 24 | 20 | # Dictionaries of settings validators. The key is the tool name, the value is | |
| 25 | 21 | # a dictionary mapping setting names to validation functions. | |
@@ -36,7 +32,7 @@ | |||
| 36 | 32 | _msbuild_name_of_tool = {} | |
| 37 | 33 | ||
| 38 | 34 | ||
| 39 | - class _Tool(object): | ||
| 35 | + class _Tool: | ||
| 40 | 36 | """Represents a tool used by MSVS or MSBuild. | |
| 41 | 37 | ||
| 42 | 38 | Attributes: | |
@@ -68,7 +64,7 @@ def _GetMSBuildToolSettings(msbuild_settings, tool): | |||
| 68 | 64 | return msbuild_settings.setdefault(tool.msbuild_name, {}) | |
| 69 | 65 | ||
| 70 | 66 | ||
| 71 | - class _Type(object): | ||
| 67 | + class _Type: | ||
| 72 | 68 | """Type of settings (Base class).""" | |
| 73 | 69 | ||
| 74 | 70 | def ValidateMSVS(self, value): | |
@@ -110,11 +106,11 @@ class _String(_Type): | |||
| 110 | 106 | """A setting that's just a string.""" | |
| 111 | 107 | ||
| 112 | 108 | def ValidateMSVS(self, value): | |
| 113 | - if not isinstance(value, string_types): | ||
| 109 | + if not isinstance(value, str): | ||
| 114 | 110 | raise ValueError("expected string; got %r" % value) | |
| 115 | 111 | ||
| 116 | 112 | def ValidateMSBuild(self, value): | |
| 117 | - if not isinstance(value, string_types): | ||
| 113 | + if not isinstance(value, str): | ||
| 118 | 114 | raise ValueError("expected string; got %r" % value) | |
| 119 | 115 | ||
| 120 | 116 | def ConvertToMSBuild(self, value): | |
@@ -126,11 +122,11 @@ class _StringList(_Type): | |||
| 126 | 122 | """A settings that's a list of strings.""" | |
| 127 | 123 | ||
| 128 | 124 | def ValidateMSVS(self, value): | |
| 129 | - if not isinstance(value, string_types) and not isinstance(value, list): | ||
| 125 | + if not isinstance(value, (list, str)): | ||
| 130 | 126 | raise ValueError("expected string list; got %r" % value) | |
| 131 | 127 | ||
| 132 | 128 | def ValidateMSBuild(self, value): | |
| 133 | - if not isinstance(value, string_types) and not isinstance(value, list): | ||
| 129 | + if not isinstance(value, (list, str)): | ||
| 134 | 130 | raise ValueError("expected string list; got %r" % value) | |
| 135 | 131 | ||
| 136 | 132 | def ConvertToMSBuild(self, value): | |
@@ -195,7 +191,7 @@ class _Enumeration(_Type): | |||
| 195 | 191 | def __init__(self, label_list, new=None): | |
| 196 | 192 | _Type.__init__(self) | |
| 197 | 193 | self._label_list = label_list | |
| 198 | - self._msbuild_values = set(value for value in label_list if value is not None) | ||
| 194 | + self._msbuild_values = {value for value in label_list if value is not None} | ||
| 199 | 195 | if new is not None: | |
| 200 | 196 | self._msbuild_values.update(new) | |
| 201 | 197 | ||
@@ -342,7 +338,7 @@ def _Translate(value, msbuild_settings): | |||
| 342 | 338 | if value == "true": | |
| 343 | 339 | tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool) | |
| 344 | 340 | if "AdditionalOptions" in tool_settings: | |
| 345 | - new_flags = "%s %s" % (tool_settings["AdditionalOptions"], flag) | ||
| 341 | + new_flags = "{} {}".format(tool_settings["AdditionalOptions"], flag) | ||
| 346 | 342 | else: | |
| 347 | 343 | new_flags = flag | |
| 348 | 344 | tool_settings["AdditionalOptions"] = new_flags | |
@@ -536,14 +532,14 @@ def _ValidateSettings(validators, settings, stderr): | |||
| 536 | 532 | tool_validators[setting](value) | |
| 537 | 533 | except ValueError as e: | |
| 538 | 534 | print( | |
| 539 | - "Warning: for %s/%s, %s" % (tool_name, setting, e), | ||
| 535 | + f"Warning: for {tool_name}/{setting}, {e}", | ||
| 540 | 536 | file=stderr, | |
| 541 | 537 | ) | |
| 542 | 538 | else: | |
| 543 | 539 | _ValidateExclusionSetting( | |
| 544 | 540 | setting, | |
| 545 | 541 | tool_validators, | |
| 546 | - ("Warning: unrecognized setting %s/%s" % (tool_name, setting)), | ||
| 542 | + (f"Warning: unrecognized setting {tool_name}/{setting}"), | ||
| 547 | 543 | stderr, | |
| 548 | 544 | ) | |
| 549 | 545 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments