summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2020-03-17 07:29:11 (GMT)
committerGitHub <noreply@github.com>2020-03-17 07:29:11 (GMT)
commit58ec58a42bece5b2804b178c7a6a7e67328465db (patch)
tree7288158127b5e6f15eccce9907ce0d1a664737c9
parent2037502613471a0a0a0262085cc50adb378ebbad (diff)
downloadcpython-58ec58a42bece5b2804b178c7a6a7e67328465db.zip
cpython-58ec58a42bece5b2804b178c7a6a7e67328465db.tar.gz
cpython-58ec58a42bece5b2804b178c7a6a7e67328465db.tar.bz2
bpo-39656: Ensure `bin/python3.#` is always present in virtual environments on POSIX (GH-19030)
-rw-r--r--Lib/venv/__init__.py2
-rw-r--r--Misc/NEWS.d/next/Library/2020-03-16-11-38-45.bpo-39656.MaNOgm.rst2
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
index a220ef7..8009deb 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 0000000..937d162
--- /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.