build: avoid usage of pipes library

Python's `pipes` library is deprecated and will be removed in Python
version 3.13, so remove it's import and replace `pipes.quote()` with
`shlex.quote()`.

PR-URL: https://github.com/nodejs/node/pull/47271
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
This commit is contained in:
Mohammed Keyvanzadeh authored and RafaelGSS committed 2023-04-07 10:09:18 -03:00
1 parent e29a1462c7
commit 3970537bb4
1 file changed
+1 -2
+1 -2
View File
@@ -5,7 +5,6 @@ import sys
import errno
import argparse
import os
import pipes
import pprint
import re
import shlex
@@ -2074,7 +2073,7 @@ write('config.gypi', do_not_edit +
pprint.pformat(output, indent=2, width=1024) + '\n')
write('config.status', '#!/bin/sh\nset -x\nexec ./configure ' +
' '.join([pipes.quote(arg) for arg in original_argv]) + '\n')
' '.join([shlex.quote(arg) for arg in original_argv]) + '\n')
os.chmod('config.status', 0o775)