Commits

Janez Demšar  committed 9097e98

Added parentheses in prints in setup of orangeqt for compatibility with Python 3.0.

  • Participants
  • Parent commits 1e33117

Comments (0)

Files changed (3)

File source/orangeqt/Makefile

   PYTHON=$(shell which python)
 endif
 
-PYTHON_VERSION = $(shell $(PYTHON) -c 'import sys; print "%s.%s" % sys.version_info[:2]')
+PYTHON_VERSION = $(shell $(PYTHON) -c 'import sys; print("%s.%s" % sys.version_info[:2])')
 OS = $(shell uname)
 
 all:
 ifeq ($(OS), Darwin)
 	install_name_tool -id $(DESTDIR)/orangeqt.so $(OLD)/orangeqt.so
 endif
-	
+
 
 cleantemp:
 	rm -rf $(ORANGEQT_BUILD_DIR)

File source/orangeqt/modules/FindNumpy.cmake

 #  set (NUMPY_FIND_QUIETLY TRUE)
 #endif (NUMPY_INCLUDE_DIR)
 
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c 
-    "import numpy; print numpy.get_include()"
+EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
+    "import numpy; print(numpy.get_include())"
     OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
     OUTPUT_STRIP_TRAILING_WHITESPACE)
 

File source/orangeqt/modules/SIPMacros.cmake

         ENDFOREACH(filename ${_sip_output_files})
     ENDIF(NOT WIN32)
     ADD_CUSTOM_COMMAND(
-        OUTPUT ${_sip_output_files} 
+        OUTPUT ${_sip_output_files}
         COMMAND ${CMAKE_COMMAND} -E echo ${message}
-        COMMAND ${TOUCH_COMMAND} ${_sip_output_files} 
+        COMMAND ${TOUCH_COMMAND} ${_sip_output_files}
         COMMAND ${SIP_EXECUTABLE} ${_sip_tags} ${_sip_x} ${SIP_EXTRA_OPTIONS} -j ${SIP_CONCAT_PARTS} -c ${CMAKE_CURRENT_SIP_OUTPUT_DIR} ${_sip_includes} ${_abs_module_sip}
         DEPENDS ${_abs_module_sip} ${SIP_EXTRA_FILES_DEPEND}
     )
     ELSE (CYGWIN)
         ADD_LIBRARY(${_logical_name} SHARED ${SIP_EXTRA_SOURCES} ${_sip_output_files} )
     ENDIF (CYGWIN)
-    
+
 #	IF (WIN32)
-#		SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES SUFFIX ".pyd") 
+#		SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES SUFFIX ".pyd")
 #	ENDIF (WIN32)
 
 #	Use sysconfig to get the python module extension
-	execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('SO')" 
-					RESULT_VARIABLE PYTHON_SOPY_PROCESS 
-					OUTPUT_VARIABLE PY_SO_SUFFIX 
+	execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('SO'))"
+					RESULT_VARIABLE PYTHON_SOPY_PROCESS
+					OUTPUT_VARIABLE PY_SO_SUFFIX
 					OUTPUT_STRIP_TRAILING_WHITESPACE)
 	SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES SUFFIX ${PY_SO_SUFFIX})
     TARGET_LINK_LIBRARIES(${_logical_name} ${PYTHON_LIBRARY} ${SIP_EXTRA_LINK_LIBRARIES} ${EXTRA_LINK_LIBRARIES})