Skip to content

Commit b36e49e

Browse files
lichenggangZeno-sole
authored andcommitted
feat: support Python 3.12
1 parent d7b0036 commit b36e49e

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
nodejs (18.19.1+dfsg-3deepin1) unstable; urgency=medium
2+
3+
* support python3.12.
4+
5+
-- lichenggang <[email protected]> Fri, 22 Aug 2025 16:00:05 +0800
6+
17
nodejs (18.19.1+dfsg-3) unstable; urgency=medium
28

39
* mips64el: skip failing test

debian/patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ build/test_runner_escape_path.patch
3030
build/test_dns_resolveany_bad_ancount.patch
3131
loong64/tests.patch
3232
deps/v8-no-static-zlib.patch
33+
support-python3.12.patch
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Description: <build: support Python 3.12>
2+
https://github.com/nodejs/node/commit/a709a7e0c5461583f0f8a0dc2e92e3698e8fc2da
3+
4+
--- nodejs-18.19.1+dfsg.orig/configure
5+
+++ nodejs-18.19.1+dfsg/configure
6+
@@ -4,6 +4,7 @@
7+
# Note that the mix of single and double quotes is intentional,
8+
# as is the fact that the ] goes on a new line.
9+
_=[ 'exec' '/bin/sh' '-c' '''
10+
+command -v python3.12 >/dev/null && exec python3.12 "$0" "$@"
11+
command -v python3.11 >/dev/null && exec python3.11 "$0" "$@"
12+
command -v python3.10 >/dev/null && exec python3.10 "$0" "$@"
13+
command -v python3.9 >/dev/null && exec python3.9 "$0" "$@"
14+
@@ -23,7 +24,7 @@ except ImportError:
15+
from distutils.spawn import find_executable as which
16+
17+
print('Node.js configure: Found Python {}.{}.{}...'.format(*sys.version_info))
18+
-acceptable_pythons = ((3, 11), (3, 10), (3, 9), (3, 8), (3, 7), (3, 6))
19+
+acceptable_pythons = ((3, 12), (3, 11), (3, 10), (3, 9), (3, 8), (3, 7), (3, 6))
20+
if sys.version_info[:2] in acceptable_pythons:
21+
import configure
22+
else:

0 commit comments

Comments
 (0)