summaryrefslogtreecommitdiffstats
path: root/Lib/venv
diff options
context:
space:
mode:
authorCheryl Sabella <cheryl.sabella@gmail.com>2019-03-08 22:01:27 (GMT)
committerGitHub <noreply@github.com>2019-03-08 22:01:27 (GMT)
commitd5a70c6b0355f247931f6be80b78a0ff1869c56f (patch)
treea5c246fcebea6663773635616ab2523503b56535 /Lib/venv
parent2aab5d310ca752912d5e2f79658edb6684f928c7 (diff)
downloadcpython-d5a70c6b0355f247931f6be80b78a0ff1869c56f.zip
cpython-d5a70c6b0355f247931f6be80b78a0ff1869c56f.tar.gz
cpython-d5a70c6b0355f247931f6be80b78a0ff1869c56f.tar.bz2
bpo-35661: Store the venv prompt in pyvenv.cfg (GH-11440)
Diffstat (limited to 'Lib/venv')
-rw-r--r--Lib/venv/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
index d5ab389..a309b86 100644
--- a/Lib/venv/__init__.py
+++ b/Lib/venv/__init__.py
@@ -154,6 +154,8 @@ class EnvBuilder:
incl = 'false'
f.write('include-system-site-packages = %s\n' % incl)
f.write('version = %d.%d.%d\n' % sys.version_info[:3])
+ if self.prompt is not None:
+ f.write(f'prompt = {self.prompt!r}\n')
def symlink_or_copy(self, src, dst, relative_symlinks_ok=False):
"""