Hello community, here is the log from the commit of package kitemmodels for openSUSE:Factory checked in at 2016-11-17 12:33:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kitemmodels (Old) and /work/SRC/openSUSE:Factory/.kitemmodels.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kitemmodels" Changes: -------- --- /work/SRC/openSUSE:Factory/kitemmodels/kitemmodels.changes 2016-10-28 12:21:12.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kitemmodels.new/kitemmodels.changes 2016-11-17 12:33:04.000000000 +0100 @@ -1,0 +2,8 @@ +Sat Nov 5 22:07:11 UTC 2016 - [email protected] + +- Update to 5.28.0 + * Add python bindings + * For more details please see: + https://www.kde.org/announcements/kde-frameworks-5.28.0.php + +------------------------------------------------------------------- Old: ---- kitemmodels-5.27.0.tar.xz New: ---- kitemmodels-5.28.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kitemmodels.spec ++++++ --- /var/tmp/diff_new_pack.fHVr5V/_old 2016-11-17 12:33:05.000000000 +0100 +++ /var/tmp/diff_new_pack.fHVr5V/_new 2016-11-17 12:33:05.000000000 +0100 @@ -16,16 +16,25 @@ # +%bcond_with python +%define clang_sonum 3.8 %define lname libKF5ItemModels5 -%define _tar_path 5.27 +%define _tar_path 5.28 Name: kitemmodels -Version: 5.27.0 +Version: 5.28.0 Release: 0 BuildRequires: cmake >= 2.8.12 BuildRequires: extra-cmake-modules >= %{_tar_path} BuildRequires: fdupes BuildRequires: kf5-filesystem BuildRequires: cmake(Qt5Core) >= 5.5.0 +%if %{with python} +BuildRequires: python-clang +BuildRequires: python-devel +BuildRequires: python-qt5-devel +BuildRequires: python-qt5-utils +BuildRequires: python-sip-devel +%endif Summary: Set of item models extending the Qt model-view framework License: LGPL-2.1+ Group: System/GUI/KDE @@ -56,11 +65,23 @@ KItemModels provides a set of item models extending the Qt model-view framework. Development files. +%if %{with python} +%package -n python-%{name} +Summary: Set of item models extending the Qt model-view framework +Group: Development/Libraries/KDE +Requires: %lname = %{version} +%requires_python_sip_api + +%description -n python-%{name} +KItemModels provides a set of item models extending the Qt model-view framework. +Python bindings. +%endif + %prep %setup -q %build - %cmake_kf5 -d build + %cmake_kf5 -d build -- -Dlibclang_LIBRARY=%{_libdir}/libclang.so.%{clang_sonum} %make_jobs %install @@ -83,4 +104,11 @@ %{_kf5_includedir}/ %{_kf5_mkspecsdir}/qt_KItemModels.pri +%if %{with python} +%files -n python-%{name} +%defattr(-,root,root) +%{py_libdir}/dist-packages/PyKF5 +%{_datadir}/sip/PyKF5/ +%endif + %changelog ++++++ kitemmodels-5.27.0.tar.xz -> kitemmodels-5.28.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.27.0/CMakeLists.txt new/kitemmodels-5.28.0/CMakeLists.txt --- old/kitemmodels-5.27.0/CMakeLists.txt 2016-10-02 10:02:34.000000000 +0200 +++ new/kitemmodels-5.28.0/CMakeLists.txt 2016-11-05 12:03:58.000000000 +0100 @@ -3,7 +3,7 @@ project(KItemModels) include(FeatureSummary) -find_package(ECM 5.27.0 NO_MODULE) +find_package(ECM 5.28.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -23,7 +23,7 @@ include(ECMSetupVersion) include(ECMGenerateHeaders) -set(KF5_VERSION "5.27.0") # handled by release scripts +set(KF5_VERSION "5.28.0") # handled by release scripts ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KITEMMODELS VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kitemmodels_version.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.27.0/autotests/CMakeLists.txt new/kitemmodels-5.28.0/autotests/CMakeLists.txt --- old/kitemmodels-5.27.0/autotests/CMakeLists.txt 2016-10-02 10:02:34.000000000 +0200 +++ new/kitemmodels-5.28.0/autotests/CMakeLists.txt 2016-11-05 12:03:58.000000000 +0100 @@ -34,3 +34,10 @@ LINK_LIBRARIES KF5::ItemModels Qt5::Test Qt5::Widgets proxymodeltestsuite ) +if (PythonModuleGeneration_FOUND AND EXISTS ${CMAKE_BINARY_DIR}/prefix/lib/python2.7/dist-packages) + add_test(NAME Py2${name} COMMAND python2 ${pythontest} ${CMAKE_BINARY_DIR}/prefix/lib/python2.7/dist-packages) +endif() + +if (PythonModuleGeneration_FOUND AND EXISTS ${CMAKE_BINARY_DIR}/prefix/lib/python3.5/dist-packages) + add_test(NAME Py3${name} COMMAND python3 ${pythontest} ${CMAKE_BINARY_DIR}/prefix/lib/python3.5/dist-packages) +endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.27.0/autotests/pythontest.py new/kitemmodels-5.28.0/autotests/pythontest.py --- old/kitemmodels-5.27.0/autotests/pythontest.py 1970-01-01 01:00:00.000000000 +0100 +++ new/kitemmodels-5.28.0/autotests/pythontest.py 2016-11-05 12:03:58.000000000 +0100 @@ -0,0 +1,33 @@ +#!/usr/bin/env python +#-*- coding: utf-8 -*- + +import sys + +sys.path.append(sys.argv[1]) + +from PyQt5 import QtCore +from PyQt5 import QtWidgets + +from PyKF5 import KItemModels + +def main(): + app = QtWidgets.QApplication(sys.argv) + + stringListModel = QtCore.QStringListModel(["Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", "Saturday", "Sunday"]); + + selectionModel = QtCore.QItemSelectionModel() + selectionModel.setModel(stringListModel) + + selectionProxy = KItemModels.KSelectionProxyModel() + selectionProxy.setSelectionModel(selectionModel) + selectionProxy.setSourceModel(stringListModel) + + assert(selectionProxy.rowCount() == 0) + + selectionModel.select(stringListModel.index(0, 0), QtCore.QItemSelectionModel.Select) + + assert(selectionProxy.rowCount() == 1) + +if __name__ == '__main__': + main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.27.0/src/CMakeLists.txt new/kitemmodels-5.28.0/src/CMakeLists.txt --- old/kitemmodels-5.27.0/src/CMakeLists.txt 2016-10-02 10:02:34.000000000 +0200 +++ new/kitemmodels-5.28.0/src/CMakeLists.txt 2016-11-05 12:03:58.000000000 +0100 @@ -41,6 +41,29 @@ REQUIRED_HEADERS KItemModels_HEADERS ) +find_package(PythonModuleGeneration) + +if (PythonModuleGeneration_FOUND) + ecm_generate_python_binding( + TARGET KF5::ItemModels + PYTHONNAMESPACE PyKF5 + MODULENAME KItemModels + SIP_DEPENDS + QtCore/QtCoremod.sip + HEADERS + kbreadcrumbselectionmodel.h + kconcatenaterowsproxymodel.h + kcheckableproxymodel.h + kextracolumnsproxymodel.h + klinkitemselectionmodel.h + krearrangecolumnsproxymodel.h + krecursivefilterproxymodel.h + kdescendantsproxymodel.h + kmodelindexproxymapper.h + kselectionproxymodel.h + ) +endif() + install(TARGETS KF5ItemModels EXPORT KF5ItemModelsTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES
