Skip to content

Commit 5ac91cc

Browse files
author
Sylvain MARIE
committed
Fixed version resolution using pkg_resources. Fixed #9
1 parent cf5b07c commit 5ac91cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

getversion/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def get_version_using_pkgresources(module # type: ModuleType
9494
# pkg_dist = Distribution.from_filename(module.__file__)
9595

9696
if pkg_dist is not None:
97-
if Path(pkg_dist.location) != Path(join(dirname(module.__file__), pardir)):
97+
if Path(pkg_dist.location).resolve() != Path(join(dirname(module.__file__), pardir)).resolve():
9898
raise Exception("Another distribution of the same package (with version '%s') is installed, but is not the "
9999
"one that was imported" % pkg_dist.version)
100100

0 commit comments

Comments
 (0)