From cd99deff1ed1d6239a170ca50379605c0106d9cf Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 18 Aug 2019 12:32:23 +0300 Subject: [PATCH] Fix for Python 3.10 --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a36e192ec..76bdfb159 100755 --- a/setup.py +++ b/setup.py @@ -432,7 +432,9 @@ class pil_build_ext(build_ext): # pythonX.Y.dll.a is in the /usr/lib/pythonX.Y/config directory _add_directory( library_dirs, - os.path.join("/usr/lib", "python%s" % sys.version[:3], "config"), + os.path.join( + "/usr/lib", "python{}.{}".format(*sys.version_info), "config" + ), ) elif sys.platform == "darwin":