Commit graph

116 commits

Author SHA1 Message Date
Toyo Li
ea99fea834
feat(gyp): update gyp to v0.18.1 (#3039)
* feat(gyp): update gyp to v0.18.1

* ci: setup ninja

* ci: visual-studio job use python 3.12
2024-06-12 10:23:37 +01:00
Christian Clauss
1205fb084c
Fix lint: ruff check --select=UP032 --fix (#2994) 2024-03-12 21:54:17 -07:00
DeeDeeG
707927cd57
feat(gyp): update gyp to v0.16.1 (#2923)
* feat(gyp): update gyp to v0.15.1

* Add Python 3.12 to tests

* Try to fix CI

* Try specifying msvs-version

* Modify the visual-studio matrix

* Fix pythonLocation var

* Fix Python tests

* Get path

* polish

* feat(gyp): update gyp to v0.16.0

* feat(gyp): update gyp to v0.16.1

* CI: Don't install Python 'packaging' module (vendored in 'gyp-next' now)

* Apply suggestions from code review

* Upgrade to actions/checkout@v4

---------

Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-27 17:12:14 -07:00
Christian Clauss
1bfb083f8b
Fix Python lint error by using an f-string (#2886) 2023-07-20 15:04:39 +02:00
Christian Clauss
fc0ddc6523
feat: Upgrade Python linting from flake8 to ruff (#2815)
[Ruff](https://beta.ruff.rs/) supports [over 500 lint rules](https://beta.ruff.rs/docs/rules) including bandit, isort, pylint, pyupgrade, and flake8 plus its plugins and is written in Rust for speed.

This GitHub Action will provide contributors with intuitive GitHub Annotations.

![image](https://user-images.githubusercontent.com/3709715/223758136-afc386d2-70aa-4eff-953a-2c2d82ceea23.png)

The `Required` in the checks below should be:
1. Removed from `flake8-annotation` and added to `ruff-annotation` which replaces it.
2. Removed from `isort` and added to `ruff` which replaces it.
2023-03-13 11:43:22 +01:00
Michaël Zasso
713b8dcdbf
feat(gyp): update gyp to v0.14.0 (#2749) 2022-10-10 19:51:12 +08:00
Kevin Adler
3e2a5324f1 feat(gyp): update gyp to v0.13.0 2022-09-24 02:17:10 +01:00
Mr. Doge
c379a744c6
fix: node.js debugger adds stderr (but exit code is 0) -> shouldn't throw (#2719)
* fix: node.js debugger adds stderr (but exit code is 0) -> shouldn't throw

* input.py: subprocess.Popen() -> subprocess.run()
2022-08-22 16:19:49 +02:00
Jiawen Geng
5585792922
feat(gyp): update gyp to v0.10.0 (#2521) 2021-10-11 18:35:15 +08:00
Jiawen Geng
ed9a9ed653
feat(gyp): update gyp to v0.9.6 (#2481) 2021-08-23 14:30:21 +08:00
Jiawen Geng
814b1b0eda feat(gyp): update gyp to v0.9.1 (#2402) 2021-05-28 01:30:57 +00:00
DeeDeeG
0da2e0140d
gyp: update gyp to v0.8.1 (#2355)
PR-URL: https://github.com/nodejs/node-gyp/pull/2355
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
2021-03-31 15:43:58 +08:00
Christian Clauss
0093ec8646 gyp: Improve our flake8 linting tests
PR-URL: https://github.com/nodejs/node-gyp/pull/2356
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2021-03-31 07:38:26 +00:00
Christian Clauss
a78b584236
gyp: remove support for Python 2 (#2300)
PR-URL: https://github.com/nodejs/node-gyp/pull/2300
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2021-02-14 12:51:19 +08:00
Christian Clauss
c3c510d89e
gyp: update gyp to v0.8.0 (#2318)
PR-URL: https://github.com/nodejs/node-gyp/pull/2318
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2021-01-28 15:11:53 +08:00
Jiawen Geng
9e1397c52e
gyp: update gyp to v0.7.0 (#2284)
PR-URL: https://github.com/nodejs/node-gyp/pull/2284
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
2020-12-22 08:19:25 +08:00
Myles Borins
096e3aded5
gyp: update gyp to 0.6.2
Refs: https://github.com/nodejs/gyp-next/releases/tag/v0.6.2
PR-URL: https://github.com/nodejs/node-gyp/pull/2241
Reviewed-By: Rod Vagg <rod@vagg.org>
2020-10-17 10:36:14 +11:00
Rod Vagg
ee6a837cb7
gyp: update gyp to 0.6.1
Closes: https://github.com/nodejs/node-gyp/pull/2236
PR-URL: https://github.com/nodejs/node-gyp/pull/2238
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-10-15 11:12:52 +11:00
Samuel Attard
3baa4e4172
gyp: update gyp to 0.4.0
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
PR-URL: https://github.com/nodejs/node-gyp/pull/2165
2020-07-20 15:08:34 +10:00
Ujjwal Sharma
a6b76a8b48
gyp: update gyp to 0.2.1
PR-URL: https://github.com/nodejs/node-gyp/pull/2092
Reviewed-By: Rod Vagg <rod@vagg.org>
2020-05-26 15:15:13 +10:00
Ujjwal Sharma
ebc34ec823
gyp: update gyp to 0.2.0
PR-URL: https://github.com/nodejs/node-gyp/pull/2092
Reviewed-By: Rod Vagg <rod@vagg.org>
2020-05-26 15:14:13 +10:00
Michaël Zasso
972780bde7
gyp: sync code base with nodejs repo (#1975)
PR-URL: https://github.com/nodejs/node-gyp/pull/1975
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2020-02-19 11:42:32 +08:00
Christian Clauss
14f2a07a39
gyp: list(dict) so we can del dict(key) while iterating
Fixes #1998

Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: https://github.com/nodejs/node-gyp/pull/2009
2020-01-06 14:19:56 +11:00
cclauss
04da736d38
test: fix Python unittests
PR-URL: https://github.com/nodejs/node-gyp/pull/1961
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: João Reis <reis@janeasystems.com>
2019-11-18 13:35:41 +11:00
Wilfried Goesgens
1b11be63cc
gyp: python3 fixes: utf8 decode, use of 'None' in eval
PR-URL: https://github.com/nodejs/node-gyp/pull/1925
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-10-31 11:00:26 +11:00
cclauss
c0282daa48
gyp: iteritems() -> items() in compile_commands_json.py
PR-URL: https://github.com/nodejs/node-gyp/pull/1947
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-10-30 21:26:58 +11:00
gengjiawen
d8e09a1b6a
gyp: make cmake python3 compatible
PR-URL: https://github.com/nodejs/node-gyp/pull/1944
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-10-30 21:25:17 +11:00
Christian Clauss
9c0f3404f0
gyp: fix TypeError in XcodeVersion()
PR-URL: https://github.com/nodejs/node-gyp/pull/1939
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-10-28 10:40:00 +11:00
Christian Clauss
bb2eb72a3f
gyp: finish decode stdout on Python 3
PR-URL: https://github.com/nodejs/node-gyp/pull/1937
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-10-28 10:39:41 +11:00
Christian Clauss
60e4488f08
build: avoid bare exceptions in xcode_emulation.py
https://realpython.com/the-most-diabolical-python-antipattern/

PR-URL: https://github.com/nodejs/node-gyp/pull/1932
Reviewed-By: Rod Vagg <rod@vagg.org>
2019-10-22 21:47:34 +11:00
João Reis
f36bd228a4
gyp: add __lt__ to MSVSSolutionEntry
PR-URL: https://github.com/nodejs/node-gyp/pull/1904
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
2019-10-03 11:18:07 +10:00
Christian Clauss
a84b885756
gyp: fix undefined name: cflags --> ldflags
The current code would raise NameError at runtime.

PR-URL: https://github.com/nodejs/node-gyp/pull/1901
Reviewed-By: Rod Vagg <rod@vagg.org>
2019-10-02 10:26:32 +10:00
Christian Clauss
8e9ec3b024
gyp: modify XcodeVersion() to convert "4.2" to "0420" and "10.0" to "1000"
Ref: https://github.com/nodejs/node-addon-api/issues/445#issuecomment-535361389
PR-URL: https://github.com/nodejs/node-gyp/pull/1895
Reviewed-By: Rod Vagg <rod@vagg.org>
2019-09-27 12:18:24 +10:00
cclauss
67dec1496a
gyp: more decode stdout on Python 3
PR-URL: https://github.com/nodejs/node-gyp/pull/1894
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-09-27 12:10:40 +10:00
cclauss
d90d9c5426
gyp: decode stdout on Python 3
PR-URL: https://github.com/nodejs/node-gyp/pull/1890
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-09-26 12:15:57 +10:00
MattIPv4
0a4d8c84ce
gyp: rm semicolons (Python != JavaScript)
PR-URL: https://github.com/nodejs/node-gyp/pull/1858
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Rod Vagg <r@va.gg>
2019-08-20 21:41:51 +10:00
XhmikosR
cdb47bd54d
gyp: assorted typo fixes
PR-URL: https://github.com/nodejs/node-gyp/pull/1853
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-08-20 12:24:44 +10:00
Vladyslav Burzakovskyy
a301abcde1
gyp: use "is" when comparing to None
PR-URL: https://github.com/nodejs/node-gyp/pull/1860
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Rod Vagg <r@va.gg>
2019-08-20 10:55:46 +10:00
Jose Quijada
c7f1bcaff5
gyp: improve Windows+Cygwin compatibility
Fixes: #1782
PR-URL: https://github.com/nodejs/node-gyp/pull/1817
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Rod Vagg <r@va.gg>
2019-08-01 10:48:30 +10:00
João Reis
2592036261 gyp: Python 3 Windows fixes
PR-URL: https://github.com/nodejs/node-gyp/pull/1843
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Rod Vagg <r@va.gg>
Reviewed-By: Matt Cowley <me@mattcowley.co.uk>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-07-26 15:40:15 +01:00
Christian Clauss
5459ecaf3f build: import StringIO on Python 2 and Python 3
This change supports access to StringIO on both Python 2 and Python 3

PR-URL: https://github.com/nodejs/node-gyp/pull/1836
Reviewed-By: Rod Vagg <r@va.gg>
Reviewed-By: João Reis <reis@janeasystems.com>
2019-07-23 16:16:20 +01:00
cclauss
4ef83eddd0
build: more Python 3 compat, replace compile with ast
Make Python 3 compatiblity changes so the code works in both Python 2
and Python 3.  Especially, make changes required because the compiler
module was removed in Python 3 in favor of the ast module that exists
in both Python 2 and Python 3.

PR-URL: https://github.com/nodejs/node-gyp/pull/1820
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <r@va.gg>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-07-22 13:14:54 +10:00
KiYugadgeter
82f129d6de
gyp: replace optparse to argparse
* add_option with add_argument for argparse
  * change methods methods of RegeneratableOptionParser to match argparse function name

PR-URL: https://github.com/nodejs/node-gyp/pull/1591
Reviewed-By: cclauss <cclauss@me.com>
2019-06-26 15:42:42 +10:00
cclauss
afaaa29c61
gyp: remove from __future__ import with_statement
This \_\_future\_\_ import is no longer required in Python >= 2.6.  https://docs.python.org/2/library/__future__.html

PR-URL: https://github.com/nodejs/node-gyp/pull/1799
Reviewed-By: Rod Vagg <rod@vagg.org>
2019-06-26 15:31:04 +10:00
cclauss
a991f633d6
gyp: fix the remaining Python 3 issues
PR-URL: https://github.com/nodejs/node-gyp/pull/1793
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-06-26 15:23:23 +10:00
cclauss
f952b08f84
gyp: move from __future__ import to the top of the file
Fixes #1774
PR-URL: https://github.com/nodejs/node-gyp/pull/1789
Reviewed-By: Rod Vagg <rod@vagg.org>
2019-06-21 12:24:21 +10:00
Shuowang (Wayne) Zhang
4f4a677dfa
gyp: use different default compiler for z/OS
PR-URL: https://github.com/nodejs/node-gyp/pull/1768
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-06-21 12:24:21 +10:00
cclauss
1597c84aad
test: use Travis CI to run tests on every pull request
This is a second attempt at #1336 which got into a bad git-state...

Use flake8 to find Python syntax errors and undefined names.  There are Python 3 syntax errors and many undefined names which may raise NameError at runtime. This PR runs flake8 runs in two passes: The first looks at critical issues in stop-the-build mode and the second looks at style violations in everything-is-a-warning mode.

PR-URL: https://github.com/nodejs/node-gyp/pull/1752
Reviewed-By: Rod Vagg <rod@vagg.org>
2019-06-21 12:24:21 +10:00
João Reis
a20faedc91 gyp: enable MARMASM items only on new VS versions
PR-URL: https://github.com/nodejs/node-gyp/pull/1762
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-06-04 16:38:05 +01:00
Jon Kunkee
721eb691cf gyp: teach MSVS generator about MARMASM Items
This change allows MSVS projects generated for ARM64 to include ASM
files.

PR-URL: https://github.com/nodejs/node-gyp/pull/1679
Reviewed-By: João Reis <reis@janeasystems.com>
2019-05-07 16:29:36 +01:00