| diff -Naur Python-3.8.0-orig/Lib/distutils/spawn.py Python-3.8.0/Lib/distutils/spawn.py |
| --- Python-3.8.0-orig/Lib/distutils/spawn.py 2019-10-14 16:34:47.000000000 +0300 |
| +++ Python-3.8.0/Lib/distutils/spawn.py 2019-10-22 10:00:23.260677500 +0300 |
| @@ -12,6 +12,7 @@ |
| from distutils.errors import DistutilsPlatformError, DistutilsExecError |
| from distutils.debug import DEBUG |
| from distutils import log |
| +from subprocess import list2cmdline |
| |
| def spawn(cmd, search_path=1, verbose=0, dry_run=0): |
| """Run another program, specified as a command list 'cmd', in a new process. |
| @@ -43,17 +44,13 @@ |
| def _nt_quote_args(args): |
| """Quote command-line arguments for DOS/Windows conventions. |
| |
| - Just wraps every argument which contains blanks in double quotes, and |
| - returns a new argument list. |
| + Defer to subprocess module's list2cmdline as the logic is |
| + complex. The previous implementation here failed to handle |
| + -DG_LOG_DOMAIN="GEGL-"__FILE__ which was encountered in MSYS2 |
| + while building the gobject-introspection part of GEGL 0.3.4. |
| """ |
| - # XXX this doesn't seem very robust to me -- but if the Windows guys |
| - # say it'll work, I guess I'll have to accept it. (What if an arg |
| - # contains quotes? What other magic characters, other than spaces, |
| - # have to be escaped? Is there an escaping mechanism other than |
| - # quoting?) |
| for i, arg in enumerate(args): |
| - if ' ' in arg: |
| - args[i] = '"%s"' % arg |
| + args[i] = list2cmdline([args[i]]) |
| return args |
| |
| def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): |
| diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py |
| --- Python-3.8.0-orig/setup.py 2019-10-14 16:34:47.000000000 +0300 |
| +++ Python-3.8.0/setup.py 2019-10-22 10:00:23.666278200 +0300 |
| @@ -1421,11 +1421,7 @@ |
| '_sqlite/statement.c', |
| '_sqlite/util.c', ] |
| |
| - sqlite_defines = [] |
| - if not MS_WINDOWS: |
| - sqlite_defines.append(('MODULE_NAME', '"sqlite3"')) |
| - else: |
| - sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"')) |
| + sqlite_defines = [('MODULE_NAME', '"sqlite3"')] |
| |
| # Enable support for loadable extensions in the sqlite3 module |
| # if --enable-loadable-sqlite-extensions configure option is used. |