From 0e9afc99aa88e607618d54e305ffbaa15c06af5610d9798ceb8227801d526acb Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 20 Feb 2021 18:10:23 +0000 Subject: [PATCH] Accepting request 874020 from home:bnavigator:branches:devel:languages:python:numeric - Update to 0.1.29 * Add read-only * Only fix row and column count when not read-only * Only update visible cells in read-only mode. Dramatically speeds up viewing large datasets * Optimize copy-cut-delete (still slow) * Only update visible cells for writable tables * Fix a visualization issue when scrolling past the last row * Catch IndexError when copying * Fix RuntimeError when pasting cells - test with rudimentary example.py - adjust requirements OBS-URL: https://build.opensuse.org/request/show/874020 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-python-qdatamatrix?expand=0&rev=3 --- example.py | 37 +++++++++++++++++++++++++++++++ python-python-qdatamatrix.changes | 16 +++++++++++++ python-python-qdatamatrix.spec | 36 +++++++++++++++++++++++------- python-qdatamatrix-0.1.18.tar.gz | 3 --- python-qdatamatrix-0.1.29.tar.gz | 3 +++ 5 files changed, 84 insertions(+), 11 deletions(-) create mode 100644 example.py delete mode 100644 python-qdatamatrix-0.1.18.tar.gz create mode 100644 python-qdatamatrix-0.1.29.tar.gz diff --git a/example.py b/example.py new file mode 100644 index 0000000..d1dac00 --- /dev/null +++ b/example.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +""" +This file is part of qdatamatatrix. + +qdatamatatrix is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +qdatamatatrix is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with qdatamatatrix. If not, see . +""" + +from datamatrix import DataMatrix +from qdatamatrix import QDataMatrix +import sys +from qtpy import QtWidgets +import qtpy + +dm = DataMatrix(length=3) +dm.col1 = 1, 2, 3 +dm.col2 = 'a', 'b', 'c' +print(dm) + +app = QtWidgets.QApplication(sys.argv) +qdm = QDataMatrix(dm) +qdm.resize(600,400) +# qdm.refresh() +qdm.show() +sys.exit(app.exec_()) diff --git a/python-python-qdatamatrix.changes b/python-python-qdatamatrix.changes index ed3bf65..a9b90a5 100644 --- a/python-python-qdatamatrix.changes +++ b/python-python-qdatamatrix.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Fri Feb 19 19:04:31 UTC 2021 - Ben Greiner + +- Update to 0.1.29 + * Add read-only + * Only fix row and column count when not read-only + * Only update visible cells in read-only mode. Dramatically + speeds up viewing large datasets + * Optimize copy-cut-delete (still slow) + * Only update visible cells for writable tables + * Fix a visualization issue when scrolling past the last row + * Catch IndexError when copying + * Fix RuntimeError when pasting cells +- test with rudimentary example.py +- adjust requirements + ------------------------------------------------------------------- Wed Mar 20 08:08:19 UTC 2019 - John Vandenberg diff --git a/python-python-qdatamatrix.spec b/python-python-qdatamatrix.spec index 0ebe00c..108bb28 100644 --- a/python-python-qdatamatrix.spec +++ b/python-python-qdatamatrix.spec @@ -1,7 +1,7 @@ # # spec file for package python-python-qdatamatrix # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,26 +12,36 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 Name: python-python-qdatamatrix -Version: 0.1.18 +Version: 0.1.29 Release: 0 -License: GPL-3.0-or-later Summary: A PyQt4/PyQt5 widget for viewing and editing a DataMatrix object -Url: https://github.com/smathot/python-qdatamatrix +License: GPL-3.0-or-later Group: Development/Languages/Python +URL: https://github.com/open-cogsci/python-qdatamatrix Source: https://files.pythonhosted.org/packages/source/p/python-qdatamatrix/python-qdatamatrix-%{version}.tar.gz -Source1: https://raw.githubusercontent.com/smathot/python-qdatamatrix/master/copyright -BuildRequires: python-rpm-macros +Source1: https://raw.githubusercontent.com/open-cogsci/python-qdatamatrix/master/copyright +Source2: https://raw.githubusercontent.com/open-cogsci/python-qdatamatrix/master/example.py +BuildRequires: %{python_module PrettyTable} BuildRequires: %{python_module QtPy} +BuildRequires: %{python_module fastnumbers} BuildRequires: %{python_module python-datamatrix} +# QtPy has a number of possible backends, none of them mandatory, use PyQt5 for the build +BuildRequires: %{python_module qt5} BuildRequires: %{python_module setuptools} BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: xvfb-run +Requires: python-PrettyTable Requires: python-QtPy Requires: python-python-datamatrix +Recommends: python-fastnumbers BuildArch: noarch %python_subpackages @@ -43,6 +53,8 @@ view and edit a DataMatrix object. %prep %setup -q -n python-qdatamatrix-%{version} cp %{SOURCE1} . +# don't run the event loop on the example +sed '/app.exec_/ d' %{SOURCE2} > example.py %build %python_build @@ -51,8 +63,16 @@ cp %{SOURCE1} . %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%check +%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} +xvfb-run $python example.py +# wait before we start the next xvfb-run +sleep 5 +} + %files %{python_files} %license copyright -%{python_sitelib}/* +%{python_sitelib}/qdatamatrix +%{python_sitelib}/python_qdatamatrix-%{version}*-info %changelog diff --git a/python-qdatamatrix-0.1.18.tar.gz b/python-qdatamatrix-0.1.18.tar.gz deleted file mode 100644 index e4031a5..0000000 --- a/python-qdatamatrix-0.1.18.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:baeb556db4ae2cc8ba7f3c3944d88f4ba72f0d5aae0fc41fad31b5f747dfce44 -size 6539 diff --git a/python-qdatamatrix-0.1.29.tar.gz b/python-qdatamatrix-0.1.29.tar.gz new file mode 100644 index 0000000..162bdcd --- /dev/null +++ b/python-qdatamatrix-0.1.29.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9724e52e75c53f65a49afa056c3a11222d8d7f42a85c20572d4df39407cf977d +size 7585