From 47554e9f7910552968b03ca9c53dc0332fdd4ddf19ddee7aee2016513e310027 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 9 May 2025 05:35:53 +0000 Subject: [PATCH] - Switch to pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-python-qdatamatrix?expand=0&rev=6 --- .gitattributes | 23 +++++++++ .gitignore | 1 + copyright | 27 +++++++++++ example.py | 45 ++++++++++++++++++ python-python-qdatamatrix.changes | 41 ++++++++++++++++ python-python-qdatamatrix.spec | 77 +++++++++++++++++++++++++++++++ python-qdatamatrix-0.1.31.tar.gz | 3 ++ 7 files changed, 217 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 copyright create mode 100644 example.py create mode 100644 python-python-qdatamatrix.changes create mode 100644 python-python-qdatamatrix.spec create mode 100644 python-qdatamatrix-0.1.31.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/copyright b/copyright new file mode 100644 index 0000000..40218eb --- /dev/null +++ b/copyright @@ -0,0 +1,27 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: python-qdatamatrix +Source: https://github.com/smathot/python-qdatamatrix + +Files: * +Copyright: Copyright 2015-2016 Sebastiaan Mathot +License: GPL-3+ + This program 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. + . + This program 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 this package; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public + License version 3 can be found in the file + `/usr/share/common-licenses/GPL-3'. diff --git a/example.py b/example.py new file mode 100644 index 0000000..4378a41 --- /dev/null +++ b/example.py @@ -0,0 +1,45 @@ +#!/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 + + +def show(): + print(qdm._dm) + for n, c in qdm._dm.columns: + print(n, repr(c._rowid)) + + +dm = DataMatrix(length=4) +dm.sorted = False +dm.col1 = range(4) +dm.col3 = ['a', 'b', 'c', 'd'] +dm.col2 = ['e', 'f', 'g', 'h'] +print(dm) +app = QtWidgets.QApplication(sys.argv) +qdm = QDataMatrix(dm, read_only=False) +qdm.resize(600, 400) +qdm.changed.connect(show) +qdm.show() +sys.exit(app.exec_()) diff --git a/python-python-qdatamatrix.changes b/python-python-qdatamatrix.changes new file mode 100644 index 0000000..78be29e --- /dev/null +++ b/python-python-qdatamatrix.changes @@ -0,0 +1,41 @@ +------------------------------------------------------------------- +Fri May 9 05:15:05 UTC 2025 - Steve Kowalik + +- Switch to pyproject macros. + +------------------------------------------------------------------- +Thu Nov 25 20:52:01 UTC 2021 - Ben Greiner + +- Update to 0.1.31 + * Fix order of columns after undo + * Fix pasting of data with existing column names + * Avoid empty trailing row after pasting + +------------------------------------------------------------------- +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 + +- Convert to single spec +- Add %license +- Update to v0.1.18 + +------------------------------------------------------------------- +Thu Nov 10 19:35:48 UTC 2016 - avvissu@yandex.by + +- Initial package + diff --git a/python-python-qdatamatrix.spec b/python-python-qdatamatrix.spec new file mode 100644 index 0000000..7c43ad4 --- /dev/null +++ b/python-python-qdatamatrix.spec @@ -0,0 +1,77 @@ +# +# spec file for package python-python-qdatamatrix +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: python-python-qdatamatrix +Version: 0.1.31 +Release: 0 +Summary: A PyQt4/PyQt5 widget for viewing and editing a DataMatrix object +License: GPL-3.0-or-later +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/open-cogsci/python-qdatamatrix/master/copyright +Source2: https://raw.githubusercontent.com/open-cogsci/python-qdatamatrix/master/example.py +BuildRequires: %{python_module QtPy} +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 pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# SECTION TEST REQUIREMENTS (recommendations by datamatrix) +BuildRequires: xvfb-run +BuildRequires: %{python_module fastnumbers} +BuildRequires: %{python_module prettytable} +#/SECTION +Requires: python-QtPy +Requires: python-python-datamatrix +BuildArch: noarch + +%python_subpackages + +%description +The qdatamatrix package provides a graphical PyQt4/PyQt5 widget to +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 +%pyproject_wheel + +%install +%pyproject_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}/qdatamatrix +%{python_sitelib}/python_qdatamatrix-%{version}.dist-info + +%changelog diff --git a/python-qdatamatrix-0.1.31.tar.gz b/python-qdatamatrix-0.1.31.tar.gz new file mode 100644 index 0000000..997d46f --- /dev/null +++ b/python-qdatamatrix-0.1.31.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:925d617a892dfdf6aecac077fb025dfe7c0e7bcb6751ea9a84d2654229c943bb +size 8116