From 0a45f4e317d22a1cc7792a73af549e91db2b2d21 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Oct 11 2021 14:57:42 +0000 Subject: Update to new upstream release 0.12.3 (#2012669) --- diff --git a/.gitignore b/.gitignore index d78831a..80b4532 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /pyqtgraph-0.12.0.tar.gz /pyqtgraph-0.12.1.tar.gz /pyqtgraph-0.12.2.tar.gz +/pyqtgraph-0.12.3.tar.gz diff --git a/gltextitem_py310.patch b/gltextitem_py310.patch deleted file mode 100644 index b72cbe3..0000000 --- a/gltextitem_py310.patch +++ /dev/null @@ -1,51 +0,0 @@ -From db8180d88ed37425467d030bebf7792c86691b83 Mon Sep 17 00:00:00 2001 -From: Scott Talbert -Date: Sun, 11 Jul 2021 22:04:00 -0400 -Subject: [PATCH] Fix GLTextItem with Python 3.10 - -drawText() expects int arguments and Python 3.10 does not allow for -implicit rounding. ---- - pyqtgraph/opengl/items/GLTextItem.py | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) - -diff --git a/pyqtgraph/opengl/items/GLTextItem.py b/pyqtgraph/opengl/items/GLTextItem.py -index c258d44d5..59a4741d0 100644 ---- a/pyqtgraph/opengl/items/GLTextItem.py -+++ b/pyqtgraph/opengl/items/GLTextItem.py -@@ -68,15 +68,15 @@ def paint(self): - viewport = glGetIntegerv(GL_VIEWPORT) - - text_pos = self.__project(self.pos, modelview, projection, viewport) -- text_pos[1] = viewport[3] - text_pos[1] - -+ text_pos.setY(viewport[3] - text_pos.y()) - text_pos /= self.view().devicePixelRatio() - - painter = QtGui.QPainter(self.view()) - painter.setPen(self.color) - painter.setFont(self.font) - painter.setRenderHints(QtGui.QPainter.RenderHint.Antialiasing | QtGui.QPainter.RenderHint.TextAntialiasing) -- painter.drawText(text_pos[0], text_pos[1], self.text) -+ painter.drawText(text_pos, self.text) - painter.end() - - def __project(self, obj_pos, modelview, projection, viewport): -@@ -86,12 +86,11 @@ def __project(self, obj_pos, modelview, projection, viewport): - proj_vec = np.matmul(projection.T, view_vec) - - if proj_vec[3] == 0.0: -- return -+ return QtCore.QPointF(0, 0) - - proj_vec[0:3] /= proj_vec[3] - -- return np.array([ -- viewport[0] + (1.0 + proj_vec[0]) * viewport[2] / 2.0, -- viewport[1] + (1.0 + proj_vec[1]) * viewport[3] / 2.0, -- (1.0 + proj_vec[2]) / 2.0 -- ]) -+ return QtCore.QPointF( -+ viewport[0] + (1.0 + proj_vec[0]) * viewport[2] / 2, -+ viewport[1] + (1.0 + proj_vec[1]) * viewport[3] / 2 -+ ) diff --git a/python-pyqtgraph.spec b/python-pyqtgraph.spec index cec4a10..892ec60 100644 --- a/python-pyqtgraph.spec +++ b/python-pyqtgraph.spec @@ -3,16 +3,12 @@ %global py3_deps python3-PyQt5 python3-numpy python3-pyopengl Name: python-%{srcname} -Version: 0.12.2 -Release: 3%{?dist} +Version: 0.12.3 +Release: 1%{?dist} Summary: Scientific Graphics and GUI Library for Python License: MIT URL: http://www.pyqtgraph.org/ -Source0: %{pypi_source} -# git clone https://github.com/pyqtgraph/test-data -# tar -zcf pyqtgraph-test-data-5498050.tar.gz test-data -Source1: pyqtgraph-test-data-5498050.tar.gz -Patch0: gltextitem_py310.patch +Source0: https://github.com/pyqtgraph/pyqtgraph/archive/refs/tags/pyqtgraph-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel @@ -20,8 +16,8 @@ BuildRequires: python3-setuptools # For Docs BuildRequires: make %{py3_dist sphinx sphinx_rtd_theme} # For Tests -BuildRequires: %{py3_dist h5py pytest scipy six} -BuildRequires: git-core mesa-dri-drivers xorg-x11-server-Xvfb %{py3_deps} +BuildRequires: %{py3_dist h5py pytest pytest-xvfb scipy six} +BuildRequires: mesa-dri-drivers %{py3_deps} %global _description %{expand: PyQtGraph is a pure-python graphics and GUI library built on PyQt4 / PySide and @@ -47,10 +43,7 @@ Summary: Documentation for the %{srcname} library This package provides documentation for the %{srcname} library. %prep -%autosetup -p1 -n %{srcname}-%{version} -%setup -T -D -b 1 -n %{srcname}-%{version} -mkdir ~/.pyqtgraph -mv ../test-data ~/.pyqtgraph +%autosetup -p1 -n %{srcname}-%{srcname}-%{version} %build %py3_build @@ -63,7 +56,7 @@ rm -f doc/build/html/.buildinfo rm -f doc/build/html/objects.inv %check -PYTHONPATH=%{buildroot}%{python3_sitelib} PYTHONDONTWRITEBYTECODE=1 xvfb-run -a py.test-%{python3_version} -k "not (test_reload)" +%pytest -k "not (test_reload)" %files -n python3-%{srcname} %license LICENSE.txt @@ -74,6 +67,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} PYTHONDONTWRITEBYTECODE=1 xvfb-run -a %doc examples doc/build/html %changelog +* Mon Oct 11 2021 Scott Talbert - 0.12.3-1 +- Update to new upstream release 0.12.3 (#2012669) + * Tue Jul 27 2021 Fedora Release Engineering - 0.12.2-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index 74b708d..40dcd9b 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (pyqtgraph-0.12.2.tar.gz) = cf3088407b438df2f11bba91c40229924e4caa83b6bea40162ea0166570718bb04388a1ddad3bf8e0c0279e1f1df65be96a3e6e0f7ce633780f5bd38e2a19d25 -SHA512 (pyqtgraph-test-data-5498050.tar.gz) = af4c4022c57ac281682e39cff59a589a50a2f89fc1406d756d3ebb1df6ed7f01cadefa80a39e4f8a7de5be7e2e741743627bc72c2190b658f2b79eb2f027ba28 +SHA512 (pyqtgraph-0.12.3.tar.gz) = 13f1ff4bcce7ab8c133ebb99101d300bb3abcd6ea8b7321f3aa646d6992b6988db17d478dcec52339dd380f7c6e487f47b95b9f9de616b7ff2dab35ca5f0cc30