Skip to content

Commit

Permalink
nodejs: fix build with Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ahesford committed Oct 11, 2023
1 parent e0085e8 commit d5a68be
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions srcpkgs/nodejs/patches/python312.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- ./configure.orig 2023-10-11 07:49:24.971659089 -0400
+++ ./configure 2023-10-11 07:49:51.615780727 -0400
@@ -4,6 +4,7 @@
# Note that the mix of single and double quotes is intentional,
# as is the fact that the ] goes on a new line.
_=[ 'exec' '/bin/sh' '-c' '''
+command -v python3.12 >/dev/null && exec python3.12 "$0" "$@"
command -v python3.11 >/dev/null && exec python3.11 "$0" "$@"
command -v python3.10 >/dev/null && exec python3.10 "$0" "$@"
command -v python3.9 >/dev/null && exec python3.9 "$0" "$@"
@@ -23,7 +24,7 @@
from distutils.spawn import find_executable as which

print('Node.js configure: Found Python {}.{}.{}...'.format(*sys.version_info))
-acceptable_pythons = ((3, 11), (3, 10), (3, 9), (3, 8), (3, 7), (3, 6))
+acceptable_pythons = ((3, 12), (3, 11), (3, 10), (3, 9), (3, 8), (3, 7), (3, 6))
if sys.version_info[:2] in acceptable_pythons:
import configure
else:
2 changes: 1 addition & 1 deletion srcpkgs/nodejs/template
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pkgname=nodejs
version=18.16.0
revision=3
# Need these for host v8 for torque, see https://github.com/nodejs/node/pull/21079
hostmakedepends="which pkg-config python3 zlib-devel
hostmakedepends="which pkg-config python3-setuptools zlib-devel
$(vopt_if icu icu-devel) $(vopt_if ssl openssl-devel) $(vopt_if libuv libuv-devel)
$(vopt_if nghttp2 nghttp2-devel) $(vopt_if cares c-ares-devel)"
makedepends="zlib-devel $(vopt_if icu icu-devel)
Expand Down

0 comments on commit d5a68be

Please sign in to comment.