aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-09-25 02:10:35 +0200
committerGitHub <noreply@github.com>2019-09-25 02:10:35 +0200
commit52ad33abbfb6637d74932617c7013bae0ccf6e32 (patch)
tree2540db0d6a9b7c620debf75e63ab866a85f1f677 /Lib/sysconfig.py
parentbpo-36871: Avoid duplicated 'Actual:' in assertion message (GH-16361) (diff)
downloadcpython-52ad33abbfb6637d74932617c7013bae0ccf6e32.tar.gz
cpython-52ad33abbfb6637d74932617c7013bae0ccf6e32.tar.bz2
cpython-52ad33abbfb6637d74932617c7013bae0ccf6e32.zip
bpo-38234: test_embed: test pyvenv.cfg and pybuilddir.txt (GH-16366)
Add test_init_pybuilddir() and test_init_pyvenv_cfg() to test_embed to test pyvenv.cfg and pybuilddir.txt configuration files. Fix sysconfig._generate_posix_vars(): pybuilddir.txt uses UTF-8 encoding, not ASCII.
Diffstat (limited to 'Lib/sysconfig.py')
-rw-r--r--Lib/sysconfig.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index e76e6927cb1..b9e2fafbc08 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -412,7 +412,7 @@ def _generate_posix_vars():
pprint.pprint(vars, stream=f)
# Create file used for sys.path fixup -- see Modules/getpath.c
- with open('pybuilddir.txt', 'w', encoding='ascii') as f:
+ with open('pybuilddir.txt', 'w', encoding='utf8') as f:
f.write(pybuilddir)
def _init_posix(vars):