diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-10-20 10:22:14 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-10-20 10:22:14 +0100 |
commit | 46eedbedafdb0040c37884982d4c775ce277fb7b (patch) | |
tree | db33a91259730be84999e13a8d8168c799f50ac0 /dev-python/pyqtgraph | |
parent | e23a08d0c97a0cc415aaa165da840b056f93c997 (diff) |
gentoo resync : 20.10.2021
Diffstat (limited to 'dev-python/pyqtgraph')
-rw-r--r-- | dev-python/pyqtgraph/Manifest | 5 | ||||
-rw-r--r-- | dev-python/pyqtgraph/files/pyqtgraph-0.12.2-fix-py3.10.patch | 46 | ||||
-rw-r--r-- | dev-python/pyqtgraph/pyqtgraph-0.12.2.ebuild | 49 | ||||
-rw-r--r-- | dev-python/pyqtgraph/pyqtgraph-0.12.3.ebuild | 90 |
4 files changed, 167 insertions, 23 deletions
diff --git a/dev-python/pyqtgraph/Manifest b/dev-python/pyqtgraph/Manifest index 08107e01f692..d9195d553077 100644 --- a/dev-python/pyqtgraph/Manifest +++ b/dev-python/pyqtgraph/Manifest @@ -1,4 +1,7 @@ +AUX pyqtgraph-0.12.2-fix-py3.10.patch 1784 BLAKE2B b79bf8e8e80eb6b223d5a2788118393a62336e0870f01c50b9a7c58c5f161b11c13ed37911e7fd2abedf42ef9ba3a574dc8536d8ec10ea7b59271ea0993f12ca SHA512 b012bab35bf964ee3db73af7ee8a242c37085d40d6c6ab4820794fbe48ae26175c5c865d714e807d1fc8302e9943b59b510c32cd1b6ed8022141c2e4462271f6 DIST pyqtgraph-0.12.2.tar.gz 1292676 BLAKE2B af5e61bbc7f55cda669825a9742a3f2424638d35e3a10b85b7fc635a5e40b630848bed1e88bc84383cbd3e85de538b1b1fa051d6d761b368209c1d8167f55a2a SHA512 8a7f0e1e78cf147568ee6e393a07f07301632765d1bdb50328fcf1f815dda76f3e89808cef945409dcd9142407f864f205778a76cf804d4cbce544c60bcf5042 +DIST pyqtgraph-0.12.3.tar.gz 1317230 BLAKE2B d9a7a86f976fd7d778b0f038b24e80d6cbbdb98f6cda7de0461d1e3bbac0a99745dc3cccc63f38c24128018a2f41f3a0da7437bf9ddbd3f4091fd826ae4ea915 SHA512 13f1ff4bcce7ab8c133ebb99101d300bb3abcd6ea8b7321f3aa646d6992b6988db17d478dcec52339dd380f7c6e487f47b95b9f9de616b7ff2dab35ca5f0cc30 DIST pyqtgraph-test-data-8.tar.gz 306068 BLAKE2B f3aa418dfaf2e74950fa880da4b6dfb4ef5dbd46346b78065d885c1f9fc06fc3de86756af17e27035d4cd47d98cc7ce58c036b493837b568086a4ebceb230c78 SHA512 07ef414f2b57e00589f8c18459e88ab16001c7cc3766164cdfcd69faa26cbc90ed64611fd0c5e3b401dc6a3f1a6e9e4ce6a7d9fa96ebcc4360e03fa9fbb856d2 -EBUILD pyqtgraph-0.12.2.ebuild 2448 BLAKE2B 4ce693ffec4c109bf20367ac3d0d9524ccadb4c4d357420b18bac88dc18d830cc5337d683fb3aa1cf11f088d42da23e6d9adab10d359ead8098c28f318bbf113 SHA512 a1af7760bfb2756c3539101fd45cd7fbb3de8e83fcd6adaf661eac569f243fadede2012900d2c775c3733f265eba56e18fc7e7e9780db1c8893e42b744636089 +EBUILD pyqtgraph-0.12.2.ebuild 2490 BLAKE2B 9d19a3a0842d2ff7dbf1c586f32fd02f5ffe121d14a17831c9c0506e76000d4952589bcb9717de5034bb4044c98b62e90d26b4f942dfce9d8f54c6d607e4227a SHA512 7b5bd1384f7c2dea878f57d325d45009aa661d783576b44125e43bb6397c306e866eef1ad80558bd856080a2d7c35fc96e6e76f72c78946359a7947ea0463f8e +EBUILD pyqtgraph-0.12.3.ebuild 2442 BLAKE2B 6576676b442c82e9ecc82d30b5c0dfc57e2666e3abe9edd99387a5b29830549eb36e3c72dcf44d486f4026116e43cc84f0a8d6eb977d70443668b5d93ad2a7dc SHA512 19cada260fe97705f9f337ec337503d8498c991281564a823ed19b80ae7f1a2a08d74390b393ee1c97a7bd11e70b35d144b04eec187c96ce32a059a7a9a83706 MISC metadata.xml 775 BLAKE2B 08f1417793ef0b57d978cab5b4c03e43e756a43625d8e6173a8b74d3c9dcce0547934485d192546cf81b8da03bdf21e4c800bb25e0bec452fe092ab3772a518f SHA512 b03a0aa3f6e6183ef2d81b9d0bb22f576661b353986a802f01cb670f9ae0487d84d3e91fd0a4add41e3dd830dbbc0414f4d556bc05bb89a768be9e5c2cee4ce4 diff --git a/dev-python/pyqtgraph/files/pyqtgraph-0.12.2-fix-py3.10.patch b/dev-python/pyqtgraph/files/pyqtgraph-0.12.2-fix-py3.10.patch new file mode 100644 index 000000000000..bb1e4a8a766a --- /dev/null +++ b/dev-python/pyqtgraph/files/pyqtgraph-0.12.2-fix-py3.10.patch @@ -0,0 +1,46 @@ +From db8180d88ed37425467d030bebf7792c86691b83 Mon Sep 17 00:00:00 2001 +From: Scott Talbert <swt@techie.net> +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. + +--- 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/dev-python/pyqtgraph/pyqtgraph-0.12.2.ebuild b/dev-python/pyqtgraph/pyqtgraph-0.12.2.ebuild index 3bc55a927f18..c6366f824b79 100644 --- a/dev-python/pyqtgraph/pyqtgraph-0.12.2.ebuild +++ b/dev-python/pyqtgraph/pyqtgraph-0.12.2.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{8..9} ) +PYTHON_COMPAT=( python3_{8..10} ) inherit distutils-r1 multiprocessing TEST_DATA_TAG=test-data-8 @@ -21,6 +21,7 @@ LICENSE="MIT" SLOT="0" KEYWORDS="amd64 x86" IUSE="examples opengl svg" +REQUIRED_USE="test? ( opengl svg )" RDEPEND=" >=dev-python/numpy-1.17[${PYTHON_USEDEP}] @@ -30,57 +31,61 @@ RDEPEND=" BDEPEND=" test? ( dev-python/h5py[${PYTHON_USEDEP}] - dev-python/PyQt5[svg,testlib,${PYTHON_USEDEP}] + dev-python/PyQt5[testlib,${PYTHON_USEDEP}] dev-python/pytest-xdist[${PYTHON_USEDEP}] dev-python/pytest-xvfb[${PYTHON_USEDEP}] dev-vcs/git )" +PATCHES=( + "${FILESDIR}/${P}-fix-py3.10.patch" +) + distutils_enable_sphinx doc/source distutils_enable_tests pytest python_prepare_all() { distutils-r1_python_prepare_all - if use test; then - mkdir "${HOME}"/.pyqtgraph || die - mv "${WORKDIR}/test-data-${TEST_DATA_TAG}" \ - "${HOME}"/.pyqtgraph/test-data || die - cd "${HOME}"/.pyqtgraph/test-data || die - # we need to fake a git repo - git config --global user.email "you@example.com" - git config --global user.name "Your Name" - git init -q || die - git commit -q --allow-empty -m "dummy commit" || die - git tag "${TEST_DATA_TAG}" || die - cd - >/dev/null || die - fi if ! use opengl; then rm -r pyqtgraph/opengl || die fi } python_test() { - local deselect=( + local EPYTEST_DESELECT=( # apparently fragile - --deselect tests/test_reload.py::test_reload + tests/test_reload.py::test_reload # TODO - --deselect tests/graphicsItems/test_ROI.py::test_PolyLineROI + tests/graphicsItems/test_ROI.py::test_PolyLineROI # pyside2 is normally skipped if not installed but these two # fail if it is installed # TODO: this could be due to USE flags, revisit when pyside2 # gains py3.9 - --deselect 'examples/test_examples.py::testExamples[ DateAxisItem_QtDesigner.py - PySide2 ]' - --deselect 'examples/test_examples.py::testExamples[ designerExample.py - PySide2 ]' ) distutils_install_for_testing - epytest "${deselect[@]}" \ - -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" + epytest -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" +} + +src_test() { + mkdir "${HOME}"/.pyqtgraph || die + mv "${WORKDIR}/test-data-${TEST_DATA_TAG}" \ + "${HOME}"/.pyqtgraph/test-data || die + cd "${HOME}"/.pyqtgraph/test-data || die + # we need to fake a git repo + git config --global user.email "you@example.com" || die + git config --global user.name "Your Name" || die + git init -q || die + git commit -q --allow-empty -m "dummy commit" || die + git tag "${TEST_DATA_TAG}" || die + cd - >/dev/null || die + + distutils-r1_src_test } python_install_all() { diff --git a/dev-python/pyqtgraph/pyqtgraph-0.12.3.ebuild b/dev-python/pyqtgraph/pyqtgraph-0.12.3.ebuild new file mode 100644 index 000000000000..2d46c69243c3 --- /dev/null +++ b/dev-python/pyqtgraph/pyqtgraph-0.12.3.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit distutils-r1 multiprocessing + +TEST_DATA_TAG=test-data-8 +DESCRIPTION="A pure-python graphics and GUI library built on PyQt and numpy" +HOMEPAGE="https://www.pyqtgraph.org/ https://pypi.org/project/pyqtgraph/" +SRC_URI=" + https://github.com/pyqtgraph/pyqtgraph/archive/${P}.tar.gz + test? ( + https://github.com/pyqtgraph/test-data/archive/${TEST_DATA_TAG}.tar.gz + -> ${PN}-${TEST_DATA_TAG}.tar.gz + )" +S=${WORKDIR}/${PN}-${P} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples opengl svg" +REQUIRED_USE="test? ( opengl svg )" + +RDEPEND=" + >=dev-python/numpy-1.17[${PYTHON_USEDEP}] + dev-python/scipy[${PYTHON_USEDEP}] + dev-python/PyQt5[gui,widgets,opengl=,svg=,${PYTHON_USEDEP}] + opengl? ( dev-python/pyopengl[${PYTHON_USEDEP}] )" +BDEPEND=" + test? ( + dev-python/h5py[${PYTHON_USEDEP}] + dev-python/PyQt5[testlib,${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + dev-python/pytest-xvfb[${PYTHON_USEDEP}] + dev-vcs/git + )" + +distutils_enable_sphinx doc/source +distutils_enable_tests pytest + +python_prepare_all() { + distutils-r1_python_prepare_all + + if ! use opengl; then + rm -r pyqtgraph/opengl || die + fi +} + +python_test() { + local EPYTEST_DESELECT=( + # apparently fragile + tests/test_reload.py::test_reload + + # TODO + tests/graphicsItems/test_ROI.py::test_PolyLineROI + + # pyside2 is normally skipped if not installed but these two + # fail if it is installed + # TODO: this could be due to USE flags, revisit when pyside2 + # gains py3.9 + 'examples/test_examples.py::testExamples[ DateAxisItem_QtDesigner.py - PySide2 ]' + 'examples/test_examples.py::testExamples[ designerExample.py - PySide2 ]' + ) + + distutils_install_for_testing + epytest -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" +} + +src_test() { + mkdir "${HOME}"/.pyqtgraph || die + mv "${WORKDIR}/test-data-${TEST_DATA_TAG}" \ + "${HOME}"/.pyqtgraph/test-data || die + cd "${HOME}"/.pyqtgraph/test-data || die + # we need to fake a git repo + git config --global user.email "you@example.com" || die + git config --global user.name "Your Name" || die + git init -q || die + git commit -q --allow-empty -m "dummy commit" || die + git tag "${TEST_DATA_TAG}" || die + cd - >/dev/null || die + + distutils-r1_src_test +} + +python_install_all() { + use examples && DOCS+=( examples/ ) + distutils-r1_python_install_all +} |