utf8 python for sip, not enough, but it's a start

This commit is contained in:
isanae
2020-05-13 14:54:46 -04:00
parent a4da8da6d7
commit 91379059f4
2 changed files with 17 additions and 5 deletions
+3 -3
View File
@@ -20,10 +20,10 @@ vcvars =
[prebuilt]
boost = true
lz4 = true
lz4 = false
openssl = true
pyqt = true
python = true
pyqt = false
python = false
usvfs = false
[versions]
+14 -2
View File
@@ -100,12 +100,18 @@ void sip::download()
run_tool(process_runner(process()
.binary(python::python_exe())
.chcp(65001)
.stdout_encoding(encodings::utf8)
.stderr_encoding(encodings::utf8)
.arg("-X", "utf8")
.arg("-m", "pip")
.arg("download")
.arg("--no-binary=:all:")
.arg("--no-deps")
.arg("-d", paths::cache())
.arg("sip==" + version())));
.arg("sip==" + version())
.env(this_env::get()
.set("PYTHONUTF8", "1"))));
}
void sip::generate()
@@ -127,6 +133,9 @@ void sip::generate()
run_tool(process_runner(process()
.binary(python::python_exe())
.chcp(65001)
.stdout_encoding(encodings::utf8)
.stderr_encoding(encodings::utf8)
.stderr_filter([&](process::filter& f)
{
if (f.line.find("zip_safe flag not set") != std::string::npos)
@@ -134,9 +143,12 @@ void sip::generate()
else if (f.line.find("module references __file__") != std::string::npos)
f.lv = context::level::trace;
})
.arg("-X", "utf8")
.arg("setup.py")
.arg("install")
.cwd(source_path())));
.cwd(source_path())
.env(this_env::get()
.set("PYTHONUTF8", "1"))));
run_tool(process_runner(process()
.binary(sip_module_exe())