Hello community,

here is the log from the commit of package kdelibs4 for openSUSE:Factory 
checked in at 2012-10-18 21:51:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdelibs4 (Old)
 and      /work/SRC/openSUSE:Factory/.kdelibs4.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdelibs4", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kdelibs4/kdelibs4.changes        2012-10-08 
07:11:23.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kdelibs4.new/kdelibs4.changes   2012-10-18 
21:51:27.000000000 +0200
@@ -1,0 +2,7 @@
+Sat Oct 13 08:10:10 UTC 2012 - [email protected]
+
+- Add patch from upstream to enable correct Python 3 installation:
+  this is a prerequisite to provide PyKDE4 Python 3 packages.
+- Currently the patch is enabled just for Factory (openSUSE 12.3)
+
+-------------------------------------------------------------------

New:
----
  kdelibs4-fix-python3-install.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kdelibs4.spec ++++++
--- /var/tmp/diff_new_pack.v2VaKK/_old  2012-10-18 21:51:28.000000000 +0200
+++ /var/tmp/diff_new_pack.v2VaKK/_new  2012-10-18 21:51:28.000000000 +0200
@@ -115,6 +115,8 @@
 %if %{suse_version} > 1220
 # PATCH-FIX-UPSTREAM Build a udisks2 backend for solid (KDE 4.10)
 Patch100:       enable-solid-udisks2-backend.diff
+# PATCH-FIX-UPSTREAM Enable support for installing Python 3 modules
+Patch101:       kdelibs4-fix-python3-install.diff
 %endif
 PreReq:         permissions
 Requires:       soprano >= %( echo `rpm -q --queryformat '%{VERSION}' 
libsoprano-devel`)
@@ -186,6 +188,7 @@
 %patch26 -p1
 %if %{suse_version} > 1220
 %patch100 -p1
+%patch101 -p1
 %endif
 
 #
@@ -270,7 +273,7 @@
 
 %package doc
 Summary:        Documentation for KDE Base Libraries
-License:        LGPL-2.1+ and SUSE-GFDL-1.2+
+License:        LGPL-2.1+ and GFDL-1.2+
 Group:          System/GUI/KDE
 %define regcat /usr/bin/sgml-register-catalog
 PreReq:         %{regcat}


++++++ kdelibs4-fix-python3-install.diff ++++++
diff --git a/cmake/modules/PythonMacros.cmake b/cmake/modules/PythonMacros.cmake
index 774c6b2..661e32d 100644
--- a/cmake/modules/PythonMacros.cmake
+++ b/cmake/modules/PythonMacros.cmake
@@ -7,21 +7,21 @@
 #
 # This file defines the following macros:
 #
-# PYTHON_INSTALL (SOURCE_FILE DESINATION_DIR)
+# PYTHON_INSTALL (SOURCE_FILE DESTINATION_DIR)
 #     Install the SOURCE_FILE, which is a Python .py file, into the
 #     destination directory during install. The file will be byte compiled
 #     and both the .py file and .pyc file will be installed.
 
 GET_FILENAME_COMPONENT(PYTHON_MACROS_MODULE_PATH ${CMAKE_CURRENT_LIST_FILE}  
PATH)
 
-MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR)
+MACRO(PYTHON_INSTALL SOURCE_FILE DESTINATION_DIR)
 
   FIND_FILE(_python_compile_py PythonCompile.py PATHS ${CMAKE_MODULE_PATH})
 
   ADD_CUSTOM_TARGET(compile_python_files ALL)
 
   # Install the source file.
-  INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR})
+  INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESTINATION_DIR})
 
   # Byte compile and install the .pyc file.        
   GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE)
@@ -34,11 +34,19 @@ MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR)
   endif(WIN32)
 
   SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename})
-  SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc)
+
+  # Python 3.2 changed the pyc file location
+  IF(PYTHON_SHORT_VERSION GREATER 3.1)
+    # To get the right version for suffix
+    STRING(REPLACE "." "" _suffix ${PYTHON_SHORT_VERSION})
+    SET(_bin_pyc 
${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/__pycache__/${_filenamebase}.cpython-${_suffix}.pyc)
+  ELSE(PYTHON_SHORT_VERSION GREATER 3.1)
+    SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc)
+  ENDIF(PYTHON_SHORT_VERSION GREATER 3.1)
 
   FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath})
 
-  SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}")
+  SET(_message "Byte-compiling ${_bin_py}")
 
   GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE)
   IF(_abs_bin_py STREQUAL ${_absfilename})    # Don't copy the file onto 
itself.
@@ -58,5 +66,10 @@ MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR)
     )
   ENDIF(_abs_bin_py STREQUAL ${_absfilename})
 
-  INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR})
+  IF(PYTHON_SHORT_VERSION GREATER 3.1)
+    INSTALL(FILES ${_bin_pyc} DESTINATION ${DESTINATION_DIR}/__pycache__/)
+  ELSE (PYTHON_SHORT_VERSION GREATER 3.1)
+      INSTALL(FILES ${_bin_pyc} DESTINATION ${DESTINATION_DIR})
+  ENDIF (PYTHON_SHORT_VERSION GREATER 3.1)
+
 ENDMACRO(PYTHON_INSTALL)

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to