@@ -175,6 +175,7 @@ def testSIMD(compiler, cxx_flags, compiler_arg = None):
175
175
{'name' : "cuda_library" , 'default' : None , 'pattern' : re .compile (r"^CUDA_CUDA_LIBRARY:FILEPATH=(.+)$" )},
176
176
{'name' : "cuda_version" , 'default' : None , 'pattern' : re .compile (r"^CUDA_VERSION:STRING=(.+)$" )},
177
177
{'name' : "core_dependencies" , 'default' : None , 'pattern' : re .compile (r"^opencv_core_LIB_DEPENDS:STATIC=(.+)$" )},
178
+ {'name' : "python" , 'default' : None , 'pattern' : re .compile (r"^BUILD_opencv_python:BOOL=(.*)$" )},
178
179
{'name' : "python2" , 'default' : None , 'pattern' : re .compile (r"^BUILD_opencv_python2:BOOL=(.*)$" )},
179
180
{'name' : "python3" , 'default' : None , 'pattern' : re .compile (r"^BUILD_opencv_python3:BOOL=(.*)$" )},
180
181
)
@@ -253,6 +254,8 @@ def gatherTests(self, mask, isGood = None):
253
254
files = glob .glob (os .path .join (d , mask ))
254
255
if not self .getOS () == "android" and self .withJava ():
255
256
files .append ("java" )
257
+ if self .withPython ():
258
+ files .append ("python" )
256
259
if self .withPython2 ():
257
260
files .append ("python2" )
258
261
if self .withPython3 ():
@@ -261,14 +264,17 @@ def gatherTests(self, mask, isGood = None):
261
264
return []
262
265
263
266
def isMainModule (self , name ):
264
- return name in self .main_modules + ['python2' , 'python3' ]
267
+ return name in self .main_modules + ['python' , ' python2' , 'python3' ]
265
268
266
269
def withCuda (self ):
267
270
return self .cuda_version and self .with_cuda == "ON" and self .cuda_library and not self .cuda_library .endswith ("-NOTFOUND" )
268
271
269
272
def withJava (self ):
270
273
return self .ant_executable and self .java_test_binary_dir
271
274
275
+ def withPython (self ):
276
+ return self .python == 'ON'
277
+
272
278
def withPython2 (self ):
273
279
return self .python2 == 'ON'
274
280
0 commit comments