File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 32
32
COMMITID = 'none'
33
33
34
34
35
+ def determine_python_version ():
36
+ """
37
+ Determine the current python version. The function return a string such as '3.7'.
38
+ """
39
+ python_version = f"{ sys .version_info .major } .{ sys .version_info .minor } "
40
+ return python_version
41
+
42
+
35
43
def determine_opencc_version ():
36
44
# get gcc version
37
45
gcc_version = None
@@ -53,7 +61,7 @@ def determine_opencc_version():
53
61
54
62
def determine_scipy_version ():
55
63
# get python version
56
- python_version = f" { sys . version_info . major } . { sys . version_info . minor } "
64
+ python_version = determine_python_version ()
57
65
58
66
# determine scipy version
59
67
if python_version == "3.8" :
@@ -63,7 +71,7 @@ def determine_scipy_version():
63
71
64
72
def determine_matplotlib_version ():
65
73
# get python version
66
- python_version = f" { sys . version_info . major } . { sys . version_info . minor } "
74
+ python_version = determine_python_version ()
67
75
68
76
# determine matplotlib version
69
77
if python_version == "3.8" or python_version == "3.9" :
You can’t perform that action at this time.
0 commit comments