Skip to content

Commit 7032dcf

Browse files
committed
SDK-668: Change version filepath calculation to allow for different directories
1 parent 035a422 commit 7032dcf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

yoti_python_sdk/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# -*- coding: utf-8 -*-
2+
import os
3+
24
from distutils.util import convert_path
35
from os import environ
46

@@ -11,7 +13,11 @@
1113
}
1214

1315
main_ns = {}
14-
ver_path = convert_path('yoti_python_sdk/version.py')
16+
17+
directory_name = os.path.dirname(__file__)
18+
version_path = os.path.join(directory_name, 'version.py')
19+
20+
ver_path = convert_path(version_path)
1521
with open(ver_path) as ver_file:
1622
exec(ver_file.read(), main_ns)
1723

0 commit comments

Comments
 (0)