From: Anthony Sottile Date: Tue, 17 Mar 2020 07:29:11 +0000 (-0700) Subject: bpo-39656: Ensure `bin/python3.#` is always present in virtual environments on POSIX... X-Git-Tag: v3.9.0a5~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58ec58a42bece5b2804b178c7a6a7e67328465db;p=thirdparty%2FPython%2Fcpython.git bpo-39656: Ensure `bin/python3.#` is always present in virtual environments on POSIX (GH-19030) --- diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py index a220ef784c13..8009deb3ea70 100644 --- a/Lib/venv/__init__.py +++ b/Lib/venv/__init__.py @@ -243,7 +243,7 @@ class EnvBuilder: copier(context.executable, path) if not os.path.islink(path): os.chmod(path, 0o755) - for suffix in ('python', 'python3'): + for suffix in ('python', 'python3', f'python3.{sys.version_info[1]}'): path = os.path.join(binpath, suffix) if not os.path.exists(path): # Issue 18807: make copies if diff --git a/Misc/NEWS.d/next/Library/2020-03-16-11-38-45.bpo-39656.MaNOgm.rst b/Misc/NEWS.d/next/Library/2020-03-16-11-38-45.bpo-39656.MaNOgm.rst new file mode 100644 index 000000000000..937d162e4f0e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-03-16-11-38-45.bpo-39656.MaNOgm.rst @@ -0,0 +1,2 @@ +Ensure ``bin/python3.#`` is always present in virtual environments on POSIX +platforms - by Anthony Sottile.