From 577e27368b6815aba93793c84c7860b9a1d3fcfb Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 7 Feb 2025 22:13:11 +0100 Subject: [PATCH 1/5] GitHub Actions: Node.js v16 and Python v3.8 are end-of-life Supported versions of Node.js: https://nodejs.org/en/about/previous-releases Supported versions of Python: https://devguide.python.org/versions Detecting the operating system in GitHub Actions: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#detecting-the-operating-system --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ec9780605..efea43124 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,14 +17,14 @@ jobs: fail-fast: false matrix: os: [ ubuntu, windows, macos ] - python-version: [3.8, '3.10', 3.11] + python-version: [ 3.9, 3.11, 3.13 ] include: - - python-version: 3.8 - node-version: 16 - - python-version: '3.10' + - python-version: 3.9 node-version: 18 - python-version: 3.11 node-version: 20 + - python-version: 3.13 + node-version: 22 steps: - uses: actions/checkout@v4 - name: Set up Node ${{ matrix.node-version }} @@ -43,8 +43,8 @@ jobs: restore-keys: | ${{ runner.os }}-node- - name: Make all (Windows) - if: matrix.os == 'windows' + if: runner.os == 'Windows' run: make all - name: Make CI (Non-windows) - if: matrix.os != 'windows' + if: runner.os != 'Windows' run: make ci From dd87185ddb5ba26e4fdb708d80ebc5978457bb6e Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 10 Feb 2025 19:18:22 +0100 Subject: [PATCH 2/5] setup-css.py: install_requires "setuptools; python_version >= '3.12'", --- python/setup-css.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/setup-css.py b/python/setup-css.py index 58d2fdb31..3e299a9c1 100755 --- a/python/setup-css.py +++ b/python/setup-css.py @@ -19,6 +19,11 @@ "cssbeautifier.tests.generated", "cssbeautifier.css", ], - install_requires=["jsbeautifier", "six>=1.13.0", "editorconfig>=0.12.2"], + install_requires=[ + "jsbeautifier", + "six>=1.13.0", + "editorconfig>=0.12.2", + "setuptools; python_version >= '3.12'", + ], license="MIT", ) From b15f3502df2fbbdaa3a4e20ac0aa68945e96821d Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 10 Feb 2025 19:20:06 +0100 Subject: [PATCH 3/5] setup-js.py: install_requires "setuptools; python_version >= '3.12'", --- python/setup-js.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/setup-js.py b/python/setup-js.py index aa7320d04..5250321e6 100755 --- a/python/setup-js.py +++ b/python/setup-js.py @@ -26,6 +26,10 @@ "jsbeautifier.unpackers", "jsbeautifier.unpackers.tests", ], - install_requires=["six>=1.13.0", "editorconfig>=0.12.2"], + install_requires=[ + "six>=1.13.0", + "editorconfig>=0.12.2", + "setuptools; python_version >= '3.12'", + ], license="MIT", ) From 7661280c7070262d9b50a664875e0599ce00343f Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 10 Feb 2025 21:35:28 +0100 Subject: [PATCH 4/5] Makefile: $(PYTHON) -m pip install "setuptools; python_version >= '3.12'" && \ --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1ddfb5482..65e065324 100644 --- a/Makefile +++ b/Makefile @@ -84,15 +84,17 @@ python/dist/*: $(BUILD_DIR)/python $(BUILD_DIR)/generate $(wildcard python/**/*. @rm -f python/dist/* @cd python && \ cp setup-css.py setup.py && \ + $(PYTHON) -m pip install "setuptools; python_version >= '3.12'" && \ $(PYTHON) setup.py sdist && \ rm setup.py @cd python && \ cp setup-js.py setup.py && \ + $(PYTHON) -m pip install "setuptools; python_version >= '3.12'" && \ $(PYTHON) setup.py sdist && \ rm setup.py # Order matters here! Install css then js to make sure the local dist version of js is used - $(SCRIPT_DIR)/python-rel pip install -U python/dist/cssbeautifier* - $(SCRIPT_DIR)/python-rel pip install -U python/dist/jsbeautifier* + $(SCRIPT_DIR)/python-rel pip install --upgrade python/dist/cssbeautifier* + $(SCRIPT_DIR)/python-rel pip install --upgrade python/dist/jsbeautifier* # python package generation build/*.tgz: js/lib/*.js From dda23751c4d76ccf07e59957a74351d8f5a15939 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 14 Feb 2025 07:18:47 +0100 Subject: [PATCH 5/5] Single quotes in Makefile? --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 65e065324..94b847fee 100644 --- a/Makefile +++ b/Makefile @@ -84,12 +84,12 @@ python/dist/*: $(BUILD_DIR)/python $(BUILD_DIR)/generate $(wildcard python/**/*. @rm -f python/dist/* @cd python && \ cp setup-css.py setup.py && \ - $(PYTHON) -m pip install "setuptools; python_version >= '3.12'" && \ + $(PYTHON) -m pip install 'setuptools; python_version >= "3.12"' && \ $(PYTHON) setup.py sdist && \ rm setup.py @cd python && \ cp setup-js.py setup.py && \ - $(PYTHON) -m pip install "setuptools; python_version >= '3.12'" && \ + $(PYTHON) -m pip install 'setuptools; python_version >= "3.12"' && \ $(PYTHON) setup.py sdist && \ rm setup.py # Order matters here! Install css then js to make sure the local dist version of js is used