| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,7 +23,7 @@ jobs: | |||
| 23 | 23 | python -m pip install --upgrade pip | |
| 24 | 24 | pip install -r requirements_dev.txt | |
| 25 | 25 | - name: Lint with flake8 | |
| 26 | - run: flake8 . --count --show-source --statistics | ||
| 26 | + run: flake8 . --ignore=E203,W503 --max-complexity=101 --max-line-length=88 --show-source --statistics | ||
| 27 | 27 | - name: Test with pytest | |
| 28 | 28 | run: pytest | |
| 29 | 29 | # - name: Run doctests with pytest | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,20 @@ | |||
| 1 | 1 | # Changelog | |
| 2 | 2 | ||
| 3 | + ## [0.10.0](https://www.github.com/nodejs/gyp-next/compare/v0.9.6...v0.10.0) (2021-08-26) | ||
| 4 | + | ||
| 5 | + | ||
| 6 | + ### Features | ||
| 7 | + | ||
| 8 | + * **msvs:** add support for Visual Studio 2022 ([#124](https://www.github.com/nodejs/gyp-next/issues/124)) ([4bd9215](https://www.github.com/nodejs/gyp-next/commit/4bd9215c44d300f06e916aec1d6327c22b78272d)) | ||
| 9 | + | ||
| 10 | + ### [0.9.6](https://www.github.com/nodejs/gyp-next/compare/v0.9.5...v0.9.6) (2021-08-23) | ||
| 11 | + | ||
| 12 | + | ||
| 13 | + ### Bug Fixes | ||
| 14 | + | ||
| 15 | + * align flake8 test ([#122](https://www.github.com/nodejs/gyp-next/issues/122)) ([f1faa8d](https://www.github.com/nodejs/gyp-next/commit/f1faa8d3081e1a47e917ff910892f00dff16cf8a)) | ||
| 16 | + * **msvs:** fix paths again in action command arguments ([#121](https://www.github.com/nodejs/gyp-next/issues/121)) ([7159dfb](https://www.github.com/nodejs/gyp-next/commit/7159dfbc5758c9ec717e215f2c36daf482c846a1)) | ||
| 17 | + | ||
| 3 | 18 | ### [0.9.5](https://www.github.com/nodejs/gyp-next/compare/v0.9.4...v0.9.5) (2021-08-18) | |
| 4 | 19 | ||
| 5 | 20 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -269,6 +269,18 @@ def _CreateVersion(name, path, sdk_based=False): | |||
| 269 | 269 | if path: | |
| 270 | 270 | path = os.path.normpath(path) | |
| 271 | 271 | versions = { | |
| 272 | + "2022": VisualStudioVersion( | ||
| 273 | + "2022", | ||
| 274 | + "Visual Studio 2022", | ||
| 275 | + solution_version="12.00", | ||
| 276 | + project_version="17.0", | ||
| 277 | + flat_sln=False, | ||
| 278 | + uses_vcxproj=True, | ||
| 279 | + path=path, | ||
| 280 | + sdk_based=sdk_based, | ||
| 281 | + default_toolset="v143", | ||
| 282 | + compatible_sdks=["v8.1", "v10.0"], | ||
| 283 | + ), | ||
| 272 | 284 | "2019": VisualStudioVersion( | |
| 273 | 285 | "2019", | |
| 274 | 286 | "Visual Studio 2019", | |
@@ -436,6 +448,7 @@ def _DetectVisualStudioVersions(versions_to_check, force_express): | |||
| 436 | 448 | 2015 - Visual Studio 2015 (14) | |
| 437 | 449 | 2017 - Visual Studio 2017 (15) | |
| 438 | 450 | 2019 - Visual Studio 2019 (16) | |
| 451 | + 2022 - Visual Studio 2022 (17) | ||
| 439 | 452 | Where (e) is e for express editions of MSVS and blank otherwise. | |
| 440 | 453 | """ | |
| 441 | 454 | version_to_year = { | |
@@ -447,6 +460,7 @@ def _DetectVisualStudioVersions(versions_to_check, force_express): | |||
| 447 | 460 | "14.0": "2015", | |
| 448 | 461 | "15.0": "2017", | |
| 449 | 462 | "16.0": "2019", | |
| 463 | + "17.0": "2022", | ||
| 450 | 464 | } | |
| 451 | 465 | versions = [] | |
| 452 | 466 | for version in versions_to_check: | |
@@ -522,7 +536,7 @@ def SelectVisualStudioVersion(version="auto", allow_fallback=True): | |||
| 522 | 536 | if version == "auto": | |
| 523 | 537 | version = os.environ.get("GYP_MSVS_VERSION", "auto") | |
| 524 | 538 | version_map = { | |
| 525 | - "auto": ("16.0", "15.0", "14.0", "12.0", "10.0", "9.0", "8.0", "11.0"), | ||
| 539 | + "auto": ("17.0", "16.0", "15.0", "14.0", "12.0", "10.0", "9.0", "8.0", "11.0"), | ||
| 526 | 540 | "2005": ("8.0",), | |
| 527 | 541 | "2005e": ("8.0",), | |
| 528 | 542 | "2008": ("9.0",), | |
@@ -536,6 +550,7 @@ def SelectVisualStudioVersion(version="auto", allow_fallback=True): | |||
| 536 | 550 | "2015": ("14.0",), | |
| 537 | 551 | "2017": ("15.0",), | |
| 538 | 552 | "2019": ("16.0",), | |
| 553 | + "2022": ("17.0",), | ||
| 539 | 554 | } | |
| 540 | 555 | override_path = os.environ.get("GYP_MSVS_OVERRIDE_PATH") | |
| 541 | 556 | if override_path: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -152,7 +152,7 @@ def _NormalizedSource(source): | |||
| 152 | 152 | return source | |
| 153 | 153 | ||
| 154 | 154 | ||
| 155 | - def _FixPath(path): | ||
| 155 | + def _FixPath(path, separator="\\"): | ||
| 156 | 156 | """Convert paths to a form that will make sense in a vcproj file. | |
| 157 | 157 | ||
| 158 | 158 | Arguments: | |
@@ -168,9 +168,12 @@ def _FixPath(path): | |||
| 168 | 168 | and not _IsWindowsAbsPath(path) | |
| 169 | 169 | ): | |
| 170 | 170 | path = os.path.join(fixpath_prefix, path) | |
| 171 | - path = path.replace("/", "\\") | ||
| 171 | + if separator == "\\": | ||
| 172 | + path = path.replace("/", "\\") | ||
| 172 | 173 | path = _NormalizedSource(path) | |
| 173 | - if path and path[-1] == "\\": | ||
| 174 | + if separator == "/": | ||
| 175 | + path = path.replace("\\", "/") | ||
| 176 | + if path and path[-1] == separator: | ||
| 174 | 177 | path = path[:-1] | |
| 175 | 178 | return path | |
| 176 | 179 | ||
@@ -185,9 +188,9 @@ def _IsWindowsAbsPath(path): | |||
| 185 | 188 | return path.startswith("c:") or path.startswith("C:") | |
| 186 | 189 | ||
| 187 | 190 | ||
| 188 | - def _FixPaths(paths): | ||
| 191 | + def _FixPaths(paths, separator="\\"): | ||
| 189 | 192 | """Fix each of the paths of the list.""" | |
| 190 | - return [_FixPath(i) for i in paths] | ||
| 193 | + return [_FixPath(i, separator) for i in paths] | ||
| 191 | 194 | ||
| 192 | 195 | ||
| 193 | 196 | def _ConvertSourcesToFilterHierarchy( | |
@@ -418,7 +421,15 @@ def _BuildCommandLineForRuleRaw( | |||
| 418 | 421 | # file out of the raw command string, and some commands (like python) are | |
| 419 | 422 | # actually batch files themselves. | |
| 420 | 423 | command.insert(0, "call") | |
| 421 | - arguments = [i.replace("$(InputDir)", "%INPUTDIR%") for i in cmd[1:]] | ||
| 424 | + # Fix the paths | ||
| 425 | + # TODO(quote): This is a really ugly heuristic, and will miss path fixing | ||
| 426 | + # for arguments like "--arg=path" or "/opt:path". | ||
| 427 | + # If the argument starts with a slash or dash, it's probably a command line | ||
| 428 | + # switch | ||
| 429 | + # Return the path with forward slashes because the command using it might | ||
| 430 | + # not support backslashes. | ||
| 431 | + arguments = [i if (i[:1] in "/-") else _FixPath(i, "/") for i in cmd[1:]] | ||
| 432 | + arguments = [i.replace("$(InputDir)", "%INPUTDIR%") for i in arguments] | ||
| 422 | 433 | arguments = [MSVSSettings.FixVCMacroSlashes(i) for i in arguments] | |
| 423 | 434 | if quote_cmd: | |
| 424 | 435 | # Support a mode for using cmd directly. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -74,8 +74,8 @@ def EncodeRspFileList(args, quote_cmd): | |||
| 74 | 74 | program = call + " " + os.path.normpath(program) | |
| 75 | 75 | else: | |
| 76 | 76 | program = os.path.normpath(args[0]) | |
| 77 | - return (program + " " + | ||
| 78 | - " ".join(QuoteForRspFile(arg, quote_cmd) for arg in args[1:])) | ||
| 77 | + return (program + " " | ||
| 78 | + + " ".join(QuoteForRspFile(arg, quote_cmd) for arg in args[1:])) | ||
| 79 | 79 | ||
| 80 | 80 | ||
| 81 | 81 | def _GenericRetrieve(root, default, path): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | 16 | setup( | |
| 17 | 17 | name="gyp-next", | |
| 18 | - version="0.9.5", | ||
| 18 | + version="0.10.0", | ||
| 19 | 19 | description="A fork of the GYP build system for use in the Node.js projects", | |
| 20 | 20 | long_description=long_description, | |
| 21 | 21 | long_description_content_type="text/markdown", | |
| Back | FazBrowse Home | New Git URL |
0 commit comments