mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-24 00:04:09 +03:00
Use f-string
This commit is contained in:
parent
ed0867abec
commit
a3356879fd
|
@ -409,15 +409,14 @@ class TestEmbeddable:
|
|||
from setuptools.command import build_ext
|
||||
|
||||
with open("embed_pil.c", "w", encoding="utf-8") as fh:
|
||||
home = sys.prefix.replace("\\", "\\\\")
|
||||
fh.write(
|
||||
"""
|
||||
f"""
|
||||
#include "Python.h"
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
char *home = \""""
|
||||
+ sys.prefix.replace("\\", "\\\\")
|
||||
+ """\";
|
||||
{{
|
||||
char *home = "{home}";
|
||||
wchar_t *whome = Py_DecodeLocale(home, NULL);
|
||||
Py_SetPythonHome(whome);
|
||||
|
||||
|
@ -432,7 +431,7 @@ int main(int argc, char* argv[])
|
|||
PyMem_RawFree(whome);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}}
|
||||
"""
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user