We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5459857 commit 90e353aCopy full SHA for 90e353a
setup.py
@@ -24,9 +24,8 @@ class RequiredDependencyException(Exception):
24
25
def get_version():
26
"""Returns version of the project."""
27
- version_file = "pillow_heif/_version.py"
28
- exec(compile(Path(version_file).read_text(encoding="utf-8"), version_file, "exec")) # pylint: disable=exec-used
29
- return locals()["__version__"]
+ match = re.search(r'__version__\s*=\s*"(.*?)"', Path("pillow_heif/_version.py").read_text(encoding="utf-8"))
+ return match.group(1)
30
31
32
def _cmd_exists(cmd: str) -> bool:
0 commit comments