commit: a0f7fa79d4df333865c7c90b93935e88fbf591cc
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 30 08:50:49 2023 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Wed Aug 30 08:52:22 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0f7fa79
dev-python/QtPy: fix disabling of pyqt5 or pyqt6
The import statement now spans three lines which broke
our sed
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
dev-python/QtPy/QtPy-2.4.0.ebuild | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dev-python/QtPy/QtPy-2.4.0.ebuild
b/dev-python/QtPy/QtPy-2.4.0.ebuild
index 677fc3b3bda7..e87365436358 100644
--- a/dev-python/QtPy/QtPy-2.4.0.ebuild
+++ b/dev-python/QtPy/QtPy-2.4.0.ebuild
@@ -159,10 +159,10 @@ src_prepare() {
sed -i -e 's:--cov=qtpy --cov-report=term-missing::' pytest.ini || die
# Disable Qt for Python implementations that are not selected
if ! use pyqt5; then
- sed -i -e "s/from PyQt5.QtCore import/raise ImportError #/"
qtpy/__init__.py || die
+ sed -i -e '/from PyQt5.QtCore import/,/)/c\ \ \ \ \ \ \ \ raise
ImportError #/' qtpy/__init__.py || die
fi
if ! use pyqt6; then
- sed -i -e "s/from PyQt6.QtCore import/raise ImportError #/"
qtpy/__init__.py || die
+ sed -i -e '/from PyQt6.QtCore import/,/)/c\ \ \ \ \ \ \ \ raise
ImportError #/' qtpy/__init__.py || die
fi
if ! use pyside2; then
sed -i -e "s/from PySide2 import/raise ImportError #/"
qtpy/__init__.py || die