Merge pull request #5249 from alalek:build_with_python3_only

pull/5260/head
Maksim Shabunin 9 years ago
commit 0be2d4188e
  1. 9
      cmake/OpenCVDetectPython.cmake
  2. 4
      modules/java/generator/gen_java.py

@ -232,8 +232,13 @@ find_python(3.4 "${MIN_VER_PYTHON3}" PYTHON3_LIBRARY PYTHON3_INCLUDE_DIR
PYTHON3_INCLUDE_DIR PYTHON3_INCLUDE_DIR2 PYTHON3_PACKAGES_PATH PYTHON3_INCLUDE_DIR PYTHON3_INCLUDE_DIR2 PYTHON3_PACKAGES_PATH
PYTHON3_NUMPY_INCLUDE_DIRS PYTHON3_NUMPY_VERSION) PYTHON3_NUMPY_INCLUDE_DIRS PYTHON3_NUMPY_VERSION)
# Use Python 2 as default Python interpreter
if(PYTHON2INTERP_FOUND) if(PYTHON_DEFAULT_EXECUTABLE)
set(PYTHON_DEFAULT_AVAILABLE "TRUE")
elseif(PYTHON2INTERP_FOUND) # Use Python 2 as default Python interpreter
set(PYTHON_DEFAULT_AVAILABLE "TRUE") set(PYTHON_DEFAULT_AVAILABLE "TRUE")
set(PYTHON_DEFAULT_EXECUTABLE "${PYTHON2_EXECUTABLE}") set(PYTHON_DEFAULT_EXECUTABLE "${PYTHON2_EXECUTABLE}")
elseif(PYTHON3INTERP_FOUND) # Use Python 2 as fallback Python interpreter (if there is no Python 2)
set(PYTHON_DEFAULT_AVAILABLE "TRUE")
set(PYTHON_DEFAULT_EXECUTABLE "${PYTHON3_EXECUTABLE}")
endif() endif()

@ -924,6 +924,10 @@ class FuncInfo(GeneralInfo):
def __repr__(self): def __repr__(self):
return Template("FUNC <$ctype $namespace.$classpath.$name $args>").substitute(**self.__dict__) return Template("FUNC <$ctype $namespace.$classpath.$name $args>").substitute(**self.__dict__)
def __lt__(self, other):
return self.__repr__() < other.__repr__()
class JavaWrapperGenerator(object): class JavaWrapperGenerator(object):
def __init__(self): def __init__(self):
self.clear() self.clear()

Loading…
Cancel
Save