Skip to content

Commit b59ddb7

Browse files
committed
Use .version instead of distutils (distuils is deprecated)
1 parent adcce3e commit b59ddb7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

yoti_python_sdk/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# -*- coding: utf-8 -*-
22
import os
3-
from distutils.util import convert_path
43
from os import environ
5-
4+
from .version import __version__
65
from yoti_python_sdk.client import Client
76

87
DEFAULTS = {
@@ -17,11 +16,8 @@
1716
directory_name = os.path.dirname(__file__)
1817
version_path = os.path.join(directory_name, "version.py")
1918

20-
ver_path = convert_path(version_path)
21-
with open(ver_path) as ver_file:
22-
exec(ver_file.read(), main_ns)
19+
exec(open(version_path).read())
2320

24-
__version__ = main_ns["__version__"]
2521
YOTI_API_URL = environ.get("YOTI_API_URL", DEFAULTS["YOTI_API_URL"])
2622

2723
YOTI_PROFILE_ENDPOINT = "/api/v1"

0 commit comments

Comments
 (0)