| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d3de0ef commit 3bb12db
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -246,8 +246,6 @@ Installation via Linux package manager can be achieved with: | |||
| 246 | 246 | ||
| 247 | 247 | FreeBSD and OpenBSD users may also need to install `libexecinfo`. | |
| 248 | 248 | ||
| 249 | - Python 3 users may also need to install `python3-distutils`. | ||
| 250 | - | ||
| 251 | 249 | #### macOS prerequisites | |
| 252 | 250 | ||
| 253 | 251 | * Xcode Command Line Tools >= 11 for macOS | |
@@ -271,11 +269,6 @@ $ ./configure | |||
| 271 | 269 | $ make -j4 | |
| 272 | 270 | ``` | |
| 273 | 271 | ||
| 274 | - If you run into a `No module named 'distutils.spawn'` error when executing | ||
| 275 | - `./configure`, please try `python3 -m pip install --upgrade setuptools` or | ||
| 276 | - `sudo apt install python3-distutils -y`. | ||
| 277 | - For more information, see <https://github.com/nodejs/node/issues/30189>. | ||
| 278 | - | ||
| 279 | 272 | The `-j4` option will cause `make` to run 4 simultaneous compilation jobs which | |
| 280 | 273 | may reduce build time. For more information, see the | |
| 281 | 274 | [GNU Make Documentation](https://www.gnu.org/software/make/manual/html_node/Parallel.html). | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,10 @@ exec python "$0" "$@" | |||
| 15 | 15 | del _ | |
| 16 | 16 | ||
| 17 | 17 | import sys | |
| 18 | - from distutils.spawn import find_executable | ||
| 18 | + try: | ||
| 19 | + from shutil import which | ||
| 20 | + except ImportError: | ||
| 21 | + from distutils.spawn import find_executable as which | ||
| 19 | 22 | ||
| 20 | 23 | print('Node.js configure: Found Python {}.{}.{}...'.format(*sys.version_info)) | |
| 21 | 24 | acceptable_pythons = ((3, 9), (3, 8), (3, 7), (3, 6)) | |
@@ -25,7 +28,7 @@ else: | |||
| 25 | 28 | python_cmds = ['python{}.{}'.format(*vers) for vers in acceptable_pythons] | |
| 26 | 29 | sys.stderr.write('Please use {}.\n'.format(' or '.join(python_cmds))) | |
| 27 | 30 | for python_cmd in python_cmds: | |
| 28 | - python_cmd_path = find_executable(python_cmd) | ||
| 31 | + python_cmd_path = which(python_cmd) | ||
| 29 | 32 | if python_cmd_path and 'pyenv/shims' not in python_cmd_path: | |
| 30 | 33 | sys.stderr.write('\t{} {}\n'.format(python_cmd_path, ' '.join(sys.argv[:1]))) | |
| 31 | 34 | sys.exit(1) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,7 @@ | |||
| 14 | 14 | import bz2 | |
| 15 | 15 | import io | |
| 16 | 16 | ||
| 17 | - from distutils.spawn import find_executable as which | ||
| 17 | + from shutil import which | ||
| 18 | 18 | from distutils.version import StrictVersion | |
| 19 | 19 | ||
| 20 | 20 | # If not run from node/, cd to node/. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments