GeezerVison is showing github.com — tools: update gyp-next to v0.16.1 · nodejs/node@0fb652e
File treeExpand file treeCollapse file tree Open diff view settings Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: tools/gyp/.flake8 -4Lines changed: 0 additions & 4 deletions Collapse file Copy file name to clipboardExpand all lines: tools/gyp/.github/workflows/Python_tests.yml +17-10Lines changed: 17 additions & 10 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 | # TODO: Enable pytest --doctest-modules | 3 | 3 |
| 4 | 4 | name: Python_tests | 5 | | -on: [push, pull_request] | | 5 | +on: | | 6 | + push: | | 7 | + branches: [ main ] | | 8 | + pull_request: | | 9 | + branches: [ main ] | | 10 | + workflow_dispatch: | 6 | 11 | jobs: | 7 | 12 | Python_tests: | 8 | 13 | runs-on: ${{ matrix.os }} | 9 | 14 | strategy: | 10 | 15 | fail-fast: false | 11 | | - max-parallel: 8 | | 16 | + max-parallel: 5 | 12 | 17 | matrix: | 13 | 18 | os: [macos-latest, ubuntu-latest] # , windows-latest] | 14 | | - python-version: ["3.7", "3.8", "3.9", "3.10"] | | 19 | + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | 15 | 20 | steps: | 16 | | - - uses: actions/checkout@v3 | | 21 | + - uses: actions/checkout@v4 | 17 | 22 | - name: Set up Python ${{ matrix.python-version }} | 18 | | - uses: actions/setup-python@v3 | | 23 | + uses: actions/setup-python@v4 | 19 | 24 | with: | 20 | 25 | python-version: ${{ matrix.python-version }} | | 26 | + allow-prereleases: true | 21 | 27 | - name: Install dependencies | 22 | 28 | run: | | 23 | | - python -m pip install --upgrade pip | 24 | | - pip install -r requirements_dev.txt | 25 | | - - name: Lint with flake8 | 26 | | - run: flake8 . --ignore=E203,W503 --max-complexity=101 --max-line-length=88 --show-source --statistics | 27 | | - - name: Test with pytest | | 29 | + python -m pip install --upgrade pip setuptools | | 30 | + pip install --editable ".[dev]" | | 31 | + - run: ./gyp -V && ./gyp --version && gyp -V && gyp --version | | 32 | + - name: Lint with ruff # See pyproject.toml for settings | | 33 | + run: ruff --output-format=github . | | 34 | + - name: Test with pytest # See pyproject.toml for settings | 28 | 35 | run: pytest | 29 | 36 | # - name: Run doctests with pytest | 30 | 37 | # run: pytest --doctest-modules |
Collapse file Copy file name to clipboard +30-12Lines changed: 30 additions & 12 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | name: node-gyp integration | 2 | | - | 3 | | -on: [push, pull_request] | 4 | | - | | 2 | +on: | | 3 | + push: | | 4 | + branches: [ main ] | | 5 | + pull_request: | | 6 | + branches: [ main ] | | 7 | + workflow_dispatch: | 5 | 8 | jobs: | 6 | | - test: | | 9 | + integration: | 7 | 10 | strategy: | 8 | 11 | fail-fast: false | 9 | 12 | matrix: | 10 | 13 | os: [macos-latest, ubuntu-latest, windows-latest] | 11 | | - python: ["3.7", "3.10"] | | 14 | + python: ["3.8", "3.10", "3.12"] | 12 | 15 |
| 13 | 16 | runs-on: ${{ matrix.os }} | 14 | 17 | steps: | 15 | 18 | - name: Clone gyp-next | 16 | | - uses: actions/checkout@v3 | | 19 | + uses: actions/checkout@v4 | 17 | 20 | with: | 18 | 21 | path: gyp-next | 19 | 22 | - name: Clone nodejs/node-gyp | 20 | | - uses: actions/checkout@v3 | | 23 | + uses: actions/checkout@v4 | 21 | 24 | with: | 22 | 25 | repository: nodejs/node-gyp | 23 | 26 | path: node-gyp | 24 | 27 | - uses: actions/setup-node@v3 | 25 | 28 | with: | 26 | | - node-version: 14.x | 27 | | - - uses: actions/setup-python@v3 | | 29 | + node-version: 18.x | | 30 | + - uses: actions/setup-python@v4 | 28 | 31 | with: | 29 | 32 | python-version: ${{ matrix.python }} | 30 | | - - name: Install dependencies | | 33 | + allow-prereleases: true | | 34 | + - name: Install Python dependencies | | 35 | + run: | | | 36 | + cd gyp-next | | 37 | + python -m pip install --upgrade pip setuptools | | 38 | + pip install --editable . | | 39 | + pip uninstall -y gyp-next | | 40 | + - name: Install Node.js dependencies | 31 | 41 | run: | | 32 | 42 | cd node-gyp | 33 | 43 | npm install --no-progress | | 36 | 46 | run: | | 37 | 47 | rm -rf node-gyp/gyp | 38 | 48 | cp -r gyp-next node-gyp/gyp | 39 | | - - name: Run tests | | 49 | + - name: Run tests (macOS or Linux) | | 50 | + if: runner.os != 'Windows' | | 51 | + shell: bash | | 52 | + run: | | | 53 | + cd node-gyp | | 54 | + npm test --python="${pythonLocation}/python" | | 55 | + - name: Run tests (Windows) | | 56 | + if: runner.os == 'Windows' | | 57 | + shell: pwsh | 40 | 58 | run: | | 41 | 59 | cd node-gyp | 42 | | - npm test | | 60 | + npm run test --python="${env:pythonLocation}\\python.exe" |
Collapse file Copy file name to clipboardExpand all lines: tools/gyp/.github/workflows/nodejs-windows.yml +8-3Lines changed: 8 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | name: Node.js Windows integration | 2 | 2 |
| 3 | | -on: [push, pull_request] | | 3 | +on: | | 4 | + push: | | 5 | + branches: [ main ] | | 6 | + pull_request: | | 7 | + branches: [ main ] | | 8 | + workflow_dispatch: | 4 | 9 |
| 5 | 10 | jobs: | 6 | 11 | build-windows: | 7 | 12 | runs-on: windows-latest | 8 | 13 | steps: | 9 | 14 | - name: Clone gyp-next | 10 | | - uses: actions/checkout@v3 | | 15 | + uses: actions/checkout@v4 | 11 | 16 | with: | 12 | 17 | path: gyp-next | 13 | 18 | - name: Clone nodejs/node | 14 | | - uses: actions/checkout@v3 | | 19 | + uses: actions/checkout@v4 | 15 | 20 | with: | 16 | 21 | repository: nodejs/node | 17 | 22 | path: node | |
Collapse file Copy file name to clipboardExpand all lines: tools/gyp/.github/workflows/release-please.yml +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 8 | 8 | release-please: | 9 | 9 | runs-on: ubuntu-latest | 10 | 10 | steps: | 11 | | - - uses: GoogleCloudPlatform/release-please-action@v2 | | 11 | + - uses: google-github-actions/release-please-action@v3 | 12 | 12 | with: | 13 | 13 | token: ${{ secrets.GITHUB_TOKEN }} | 14 | 14 | release-type: python | 15 | 15 | package-name: gyp-next | 16 | | - bump-minor-pre-major: Yes | | 16 | + bump-minor-pre-major: true |
Collapse file Copy file name to clipboardExpand all lines: tools/gyp/AUTHORS +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 14 | 14 | | 15 | 15 | | 16 | 16 | | | 17 | + |
Collapse file Copy file name to clipboardExpand all lines: tools/gyp/CHANGELOG.md +58Lines changed: 58 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | # Changelog | 2 | 2 |
| | 3 | +## [0.16.1](https://github.com/nodejs/gyp-next/compare/v0.16.0...v0.16.1) (2023-10-25) | | 4 | + | | 5 | + | | 6 | +### Bug Fixes | | 7 | + | | 8 | +* add quotes for command in msvs generator ([#217](https://github.com/nodejs/gyp-next/issues/217)) ([d3b7bcd](https://github.com/nodejs/gyp-next/commit/d3b7bcdec90d6c1b1affc15ece706e63007b7264)) | | 9 | + | | 10 | +## [0.16.0](https://github.com/nodejs/gyp-next/compare/v0.15.1...v0.16.0) (2023-10-23) | | 11 | + | | 12 | + | | 13 | +### Features | | 14 | + | | 15 | +* add VCToolsVersion for msvs ([#209](https://github.com/nodejs/gyp-next/issues/209)) ([0e35ab8](https://github.com/nodejs/gyp-next/commit/0e35ab812d890fb75cf89a19ea72bc93dd6ba186)) | | 16 | + | | 17 | +## [0.15.1](https://github.com/nodejs/gyp-next/compare/v0.15.0...v0.15.1) (2023-09-08) | | 18 | + | | 19 | + | | 20 | +### Bug Fixes | | 21 | + | | 22 | +* some Python lint issues ([#200](https://github.com/nodejs/gyp-next/issues/200)) ([d2dfe4e](https://github.com/nodejs/gyp-next/commit/d2dfe4e66b64c16b38bef984782db93d12674f05)) | | 23 | +* use generator_output as output_dir ([#191](https://github.com/nodejs/gyp-next/issues/191)) ([35ffeb1](https://github.com/nodejs/gyp-next/commit/35ffeb1da8ef3fc8311e2e812cff550568f7e8a2)) | | 24 | + | | 25 | +## [0.15.0](https://github.com/nodejs/gyp-next/compare/v0.14.1...v0.15.0) (2023-03-30) | | 26 | + | | 27 | + | | 28 | +### Features | | 29 | + | | 30 | +* **msvs:** add SpectreMitigation attribute ([#190](https://github.com/nodejs/gyp-next/issues/190)) ([853e464](https://github.com/nodejs/gyp-next/commit/853e4643b6737224a5aa0720a4108461a0230991)) | | 31 | + | | 32 | +## [0.14.1](https://github.com/nodejs/gyp-next/compare/v0.14.0...v0.14.1) (2023-02-19) | | 33 | + | | 34 | + | | 35 | +### Bug Fixes | | 36 | + | | 37 | +* flake8 extended-ignore ([#186](https://github.com/nodejs/gyp-next/issues/186)) ([c38493c](https://github.com/nodejs/gyp-next/commit/c38493c2556aa63b6dc40ab585c18aef5ca270d3)) | | 38 | +* No build_type in default_variables ([#183](https://github.com/nodejs/gyp-next/issues/183)) ([ac262fe](https://github.com/nodejs/gyp-next/commit/ac262fe82453c4e8dc47529338d157eb0b5ec0fb)) | | 39 | + | | 40 | + | | 41 | +### Documentation | | 42 | + | | 43 | +* README.md: Add pipx installation and run instructions ([#165](https://github.com/nodejs/gyp-next/issues/165)) ([4d28b15](https://github.com/nodejs/gyp-next/commit/4d28b155568dc35f11c7f86124d1dd42ba428bed)) | | 44 | + | | 45 | +## [0.14.0](https://github.com/nodejs/gyp-next/compare/v0.13.0...v0.14.0) (2022-10-08) | | 46 | + | | 47 | + | | 48 | +### Features | | 49 | + | | 50 | +* Add command line argument for `gyp --version` ([#164](https://github.com/nodejs/gyp-next/issues/164)) ([5c9f4d0](https://github.com/nodejs/gyp-next/commit/5c9f4d05678dd855e18ed2327219e5d18e5374db)) | | 51 | +* ninja build for iOS ([#174](https://github.com/nodejs/gyp-next/issues/174)) ([b6f2714](https://github.com/nodejs/gyp-next/commit/b6f271424e0033d7ed54d437706695af2ba7a1bf)) | | 52 | +* **zos:** support IBM Open XL C/C++ & PL/I compilers on z/OS ([#178](https://github.com/nodejs/gyp-next/issues/178)) ([43a7211](https://github.com/nodejs/gyp-next/commit/43a72110ae3fafb13c9625cc7a969624b27cda47)) | | 53 | + | | 54 | + | | 55 | +### Bug Fixes | | 56 | + | | 57 | +* lock windows env ([#163](https://github.com/nodejs/gyp-next/issues/163)) ([44bd0dd](https://github.com/nodejs/gyp-next/commit/44bd0ddc93ea0b5770a44dd326a2e4ae62c21442)) | | 58 | +* move configuration information into pyproject.toml ([#176](https://github.com/nodejs/gyp-next/issues/176)) ([d69d8ec](https://github.com/nodejs/gyp-next/commit/d69d8ece6dbff7af4f2ea073c9fd170baf8cb7f7)) | | 59 | +* node.js debugger adds stderr (but exit code is 0) -> shouldn't throw ([#179](https://github.com/nodejs/gyp-next/issues/179)) ([1a457d9](https://github.com/nodejs/gyp-next/commit/1a457d9ed08cfd30c9fa551bc5cf0d90fb583787)) | | 60 | + | 3 | 61 | ## [0.13.0](https://www.github.com/nodejs/gyp-next/compare/v0.12.1...v0.13.0) (2022-05-11) | 4 | 62 |
| 5 | 63 |
| |
Collapse file Copy file name to clipboardExpand all lines: tools/gyp/README.md +23Lines changed: 23 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,3 +5,26 @@ Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check | 5 | 5 |
| 6 | 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 | 7 | * `python3 -m pip install gyp-next` | | 8 | + | | 9 | +When used as a command line utility, __gyp-next__ can also be installed with [pipx](https://pypa.github.io/pipx): | | 10 | +* `pipx install gyp-next` | | 11 | +``` | | 12 | +Installing to a new venv 'gyp-next' | | 13 | + installed package gyp-next 0.13.0, installed using Python 3.10.6 | | 14 | + These apps are now globally available | | 15 | + - gyp | | 16 | +done! ✨ 🌟 ✨ | | 17 | +``` | | 18 | + | | 19 | +Or to run __gyp-next__ directly without installing it: | | 20 | +* `pipx run gyp-next --help` | | 21 | +``` | | 22 | +NOTE: running app 'gyp' from 'gyp-next' | | 23 | +usage: usage: gyp [options ...] [build_file ...] | | 24 | +
| | 25 | +options: | | 26 | + -h, --help show this help message and exit | | 27 | + --build CONFIGS configuration for build after project generation | | 28 | + --check check format of gyp files | | 29 | + [ ... ] | | 30 | +``` |
Collapse file Copy file name to clipboardExpand all lines: tools/gyp/pylib/gyp/MSVSNew.py +12-14Lines changed: 12 additions & 14 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -285,19 +285,17 @@ def Write(self, writer=gyp.common.WriteOnDiff): | 285 | 285 | "\tEndProjectSection\r\n" | 286 | 286 | ) | 287 | 287 |
| 288 | | - if isinstance(e, MSVSFolder): | 289 | | - if e.items: | 290 | | - f.write("\tProjectSection(SolutionItems) = preProject\r\n") | 291 | | - for i in e.items: | 292 | | - f.write(f"\t\t{i} = {i}\r\n") | 293 | | - f.write("\tEndProjectSection\r\n") | 294 | | - | 295 | | - if isinstance(e, MSVSProject): | 296 | | - if e.dependencies: | 297 | | - f.write("\tProjectSection(ProjectDependencies) = postProject\r\n") | 298 | | - for d in e.dependencies: | 299 | | - f.write(f"\t\t{d.get_guid()} = {d.get_guid()}\r\n") | 300 | | - f.write("\tEndProjectSection\r\n") | | 288 | + if isinstance(e, MSVSFolder) and e.items: | | 289 | + f.write("\tProjectSection(SolutionItems) = preProject\r\n") | | 290 | + for i in e.items: | | 291 | + f.write(f"\t\t{i} = {i}\r\n") | | 292 | + f.write("\tEndProjectSection\r\n") | | 293 | + | | 294 | + if isinstance(e, MSVSProject) and e.dependencies: | | 295 | + f.write("\tProjectSection(ProjectDependencies) = postProject\r\n") | | 296 | + for d in e.dependencies: | | 297 | + f.write(f"\t\t{d.get_guid()} = {d.get_guid()}\r\n") | | 298 | + f.write("\tEndProjectSection\r\n") | 301 | 299 |
| 302 | 300 | f.write("EndProject\r\n") | 303 | 301 |
| @@ -353,7 +351,7 @@ def Write(self, writer=gyp.common.WriteOnDiff): | 353 | 351 |
| 354 | 352 | # Folder mappings | 355 | 353 | # Omit this section if there are no folders | 356 | | - if any([e.entries for e in all_entries if isinstance(e, MSVSFolder)]): | | 354 | + if any(e.entries for e in all_entries if isinstance(e, MSVSFolder)): | 357 | 355 | f.write("\tGlobalSection(NestedProjects) = preSolution\r\n") | 358 | 356 | for e in all_entries: | 359 | 357 | if not isinstance(e, MSVSFolder): | |
Collapse file Copy file name to clipboardExpand all lines: tools/gyp/pylib/gyp/MSVSProject.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -79,7 +79,7 @@ def __init__(self, project_path, version, name, guid=None, platforms=None): | 79 | 79 | self.files_section = ["Files"] | 80 | 80 |
| 81 | 81 | # Keep a dict keyed on filename to speed up access. | 82 | | - self.files_dict = dict() | | 82 | + self.files_dict = {} | 83 | 83 |
| 84 | 84 | def AddToolFile(self, path): | 85 | 85 | """Adds a tool file to the project. | |
|