[pykde4] 4.9.2-3

Rex Dieter rdieter at fedoraproject.org
Mon Oct 8 16:27:49 UTC 2012


commit 1eb51d30dcadd6376b95b879dd1a19bc5ffe6dea
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Mon Oct 8 11:28:07 2012 -0500

    4.9.2-3
    
    - (re)enable python3 support
    - better sip414/pyqt495 patch

 pykde4-pyqt495.patch |   54 +++++++++++++++++++++++++++++++++
 pykde4-sip414.patch  |   82 --------------------------------------------------
 pykde4.spec          |   35 +++++++++++----------
 3 files changed, 73 insertions(+), 98 deletions(-)
---
diff --git a/pykde4-pyqt495.patch b/pykde4-pyqt495.patch
new file mode 100644
index 0000000..c1413d6
--- /dev/null
+++ b/pykde4-pyqt495.patch
@@ -0,0 +1,54 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f778510..af7a815 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -37,6 +37,7 @@ IF(PYQT4_VERSION STRLESS "040900")  # These version numbers also appear in ../CM
+ ENDIF(PYQT4_VERSION STRLESS "040900")
+ 
+ 
++
+ SET(SOPRANO_MIN_VERSION "2.0")
+ MACRO_OPTIONAL_FIND_PACKAGE(Soprano)
+ MACRO_LOG_FEATURE(Soprano_FOUND "Soprano" "Soprano Libraries" "kdesupport" FALSE "" "Required for Soprano Python bindings.")
+@@ -95,9 +96,19 @@ SET(SIP_DISABLE_FEATURES VendorID PyQt_NoPrintRangeBug)
+ 
+ # Use an extra option when compiling on Python 3.
+ IF (PYTHON_3)
+-    SET(SIP_EXTRA_OPTIONS -g -x Py_v3)
++    IF(PYQT4_VERSION STRGREATER "040904")  
++	# Disable for newer PyQt
++	SET(SIP_EXTRA_OPTIONS -g -x PyKDE_QVector -x Py_v3)
++    ELSE (PYQT4_VERSION STRGREATER "040904")
++	SET(SIP_EXTRA_OPTIONS -g -x Py_v3)
++    ENDIF(PYQT4_VERSION STRGREATER "040904")
+ ELSE (PYTHON_3)
+-    SET(SIP_EXTRA_OPTIONS -g)
++    IF(PYQT4_VERSION STRGREATER "040904")  
++	# Disable for newer PyQt
++	SET(SIP_EXTRA_OPTIONS -g -x PyKDE_QVector)
++    ELSE (PYQT4_VERSION STRGREATER "040904")
++	SET(SIP_EXTRA_OPTIONS -g)
++    ENDIF(PYQT4_VERSION STRGREATER "040904")
+ ENDIF (PYTHON_3)
+ 
+ ADD_DEFINITIONS(-D_REENTRANT -DQT_CORE_LIB -DQT_GUI_LIB -DUSING_SOPRANO_NRLMODEL_UNSTABLE_API)
+diff --git a/sip/kdecore/typedefs.sip b/sip/kdecore/typedefs.sip
+index 5a0a080..af53f85 100644
+--- a/sip/kdecore/typedefs.sip
++++ b/sip/kdecore/typedefs.sip
+@@ -951,6 +951,9 @@ template <TYPE1>
+ %End
+ };
+ 
++%Feature PyKDE_QVector
++
++%If(PyKDE_QVector)
+ %MappedType QVector<int>
+ {
+ %TypeHeaderCode
+@@ -1025,3 +1028,4 @@ template <TYPE1>
+     return sipGetState(sipTransferObj);
+ %End
+ };
++%End
+\ No newline at end of file
diff --git a/pykde4.spec b/pykde4.spec
index 524e592..94e35fc 100644
--- a/pykde4.spec
+++ b/pykde4.spec
@@ -2,13 +2,14 @@
 %define pyqt4_version_min 4.8.2
 %define sip_version_min 4.12
 %global python_ver %(%{__python} -c "import sys ; print sys.version[:3]")
-## python3 support
-# https://bugs.kde.org/275919
-#define python3 1
+%if 0%{?fedora} > 17
+# needs kdelibs-4.9.2-6+
+%define python3 1
+%endif
 
 Name:    pykde4 
 Version: 4.9.2
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: Python bindings for KDE4 
 
 # http://techbase.kde.org/Policies/Licensing_Policy
@@ -22,9 +23,9 @@ URL:     http://developer.kde.org/language-bindings/
 %endif
 Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar.xz
 
-## upstreamable patches
-# fix build against sip-4.14
-Patch50: pykde4-sip414.patch
+## upstream patches
+# fix build against sip-4.14/pyqt-4.9.5
+Patch100: pykde4-pyqt495.patch
 
 # debian patches
 Patch200: make_pykde4_respect_sip_flags.diff
@@ -146,12 +147,9 @@ Provides:  python3-PyKDE4-devel%{?_isa} = %{version}-%{release}
 %prep
 %setup -q -n pykde4-%{version}
 
-#if 0%{?fedora} > 18
-%patch50 -p1 -b .sip414
-#endif
-
+%patch100 -p1 -b .pyqt495
 %patch200 -p1 -b .respect_sip_flags
-%patch201 -p1  -b .kpythonpluginfactory_slots
+%patch201 -p1 -b .kpythonpluginfactory_slots
 
 %if 0%{?rhel}
 %patch300 -p1 -b .webkit
@@ -169,7 +167,7 @@ pushd    %{_target_platform}-python3
   -DPYTHON_INCLUDE_PATH=%{_includedir}/python%{python3_ver} \
   ..
 
-make %{?_smp_mflags} -C python/
+make %{?_smp_mflags}
 popd
 %endif
 
@@ -190,7 +188,7 @@ popd
 rm -rf %{buildroot}
 
 %if 0%{?python3}
-make install/fast DESTDIR=%{buildroot} -C %{_target_platform}-python3/python/
+make install/fast DESTDIR=%{buildroot} -C %{_target_platform}-python3
 
 # not python3 compat yet
 rm -fv %{buildroot}%{_kde4_libdir}/kde4/kpythonpluginfactory.so 
@@ -229,7 +227,7 @@ rm -rf %{buildroot}
 
 %files 
 %{python_sitearch}/PyKDE4/
-%{python_sitearch}/PyQt4/uic/widget-plugins/kde4.py*
+%{python_sitearch}/PyQt4/uic/widget-plugins/*
 %dir %{_docdir}/pykde4
 %{_kde4_libdir}/kde4/kpythonpluginfactory.so
 
@@ -249,7 +247,7 @@ rm -rf %{buildroot}
 %files -n python3-pykde4
 %doc COPYING
 %{python3_sitearch}/PyKDE4/
-%{python3_sitearch}/PyQt4/uic/widget-plugins/kde4.py*
+%{python3_sitearch}/PyQt4/uic/widget-plugins/*
 %dir %{_docdir}/python3-pykde4
 
 %if 0%{?pykde4_akonadi}
@@ -261,12 +259,17 @@ rm -rf %{buildroot}
 %files -n python3-pykde4-devel
 %{_kde4_bindir}/python3-pykdeuic4
 %{python3_sitearch}/PyQt4/uic/pykdeuic4.py*
+%{python3_sitearch}/PyQt4/uic/__pycache__/
 %{_docdir}/python3-pykde4/examples/
 %{_kde4_datadir}/python3-sip/PyKDE4/
 %endif
 
 
 %changelog
+* Mon Oct 08 2012 Rex Dieter <rdieter at fedoraproject.org> - 4.9.2-3
+- (re)enable python3 support
+- better sip414/pyqt495 patch
+
 * Mon Oct 01 2012 Rex Dieter <rdieter at fedoraproject.org> 4.9.2-2
 - rebuild (sip)
 


More information about the scm-commits mailing list