Merge pull request #8050 from radarhere/exec

This commit is contained in:
Hugo van Kemenade 2024-05-21 07:33:30 -04:00 committed by GitHub
commit d879f39711
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,8 +23,7 @@ from setuptools.command.build_ext import build_ext
def get_version():
version_file = "src/PIL/_version.py"
with open(version_file, encoding="utf-8") as f:
exec(compile(f.read(), version_file, "exec"))
return locals()["__version__"]
return f.read().split('"')[1]
configuration = {}