summaryrefslogtreecommitdiffstats
path: root/Lib/sysconfig.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-09-25 00:10:35 (GMT)
committerGitHub <noreply@github.com>2019-09-25 00:10:35 (GMT)
commit52ad33abbfb6637d74932617c7013bae0ccf6e32 (patch)
tree2540db0d6a9b7c620debf75e63ab866a85f1f677 /Lib/sysconfig.py
parent2180f6b058effbf49ec819f7cedbe76ddd4b700c (diff)
downloadcpython-52ad33abbfb6637d74932617c7013bae0ccf6e32.zip
cpython-52ad33abbfb6637d74932617c7013bae0ccf6e32.tar.gz
cpython-52ad33abbfb6637d74932617c7013bae0ccf6e32.tar.bz2
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 e76e692..b9e2faf 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):