File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 19
19
import subprocess
20
20
21
21
WIN_OV_VERSION_REGEX = re .compile (r'[0-9]{4}.[0-9].[0-9].[^_]+' )
22
+ WIN_OV_ZIP_PACKAGE_DIR = "openvino_genai_windows_"
22
23
VERSION_FILE = "src\\ version.hpp"
23
24
OVMS_PROJECT_VERSION = "2025.2"
24
25
@@ -48,14 +49,15 @@ def get_openvino_name(openvino_dir):
48
49
# Start searching from directories with biggest version numbers
49
50
dirs = sorted (dirs , reverse = True )
50
51
for dir in dirs :
51
- matches = WIN_OV_VERSION_REGEX .findall (dir )
52
- if len (matches ) > 1 :
53
- print ("[ERROR] Multiple openvino versions detected in " + os .path .join (root , dir ))
54
- exit (- 1 )
55
- if len (matches ) == 1 :
56
- print ("[INFO] Openvino detected in " + os .path .join (root , dir ))
57
- openvino_name = matches [0 ]
58
- break
52
+ if WIN_OV_ZIP_PACKAGE_DIR in dir :
53
+ matches = WIN_OV_VERSION_REGEX .findall (dir )
54
+ if len (matches ) > 1 :
55
+ print ("[ERROR] Multiple openvino versions detected in " + os .path .join (root , dir ))
56
+ exit (- 1 )
57
+ if len (matches ) == 1 :
58
+ print ("[INFO] Openvino detected in " + os .path .join (root , dir ))
59
+ openvino_name = matches [0 ]
60
+ break
59
61
60
62
# we search only 1 directory level deep
61
63
break
You can’t perform that action at this time.
0 commit comments