Accepting request 969140 from home:bnavigator:branches:devel:languages:python:numeric
- Disable PyQt6-WebEngine tests for 32-bit platforms * QtWebEngine 6.3.0 disabled 32-bit support * Needs multibuild flavor for platform specific conditions OBS-URL: https://build.opensuse.org/request/show/969140 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-QtPy?expand=0&rev=34
This commit is contained in:
parent
d725f5cea2
commit
1e4da8b3c4
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 11 08:03:56 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Disable PyQt6-WebEngine tests for 32-bit platforms
|
||||||
|
* QtWebEngine 6.3.0 disabled 32-bit support
|
||||||
|
* Needs multibuild flavor for platform specific conditions
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Apr 9 20:48:40 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
Sat Apr 9 20:48:40 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-QtPy
|
# spec file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
@ -16,13 +16,28 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
BuildArch: noarch
|
||||||
|
%endif
|
||||||
|
%bcond_without pyqt5
|
||||||
%bcond_without pyqt6
|
%bcond_without pyqt6
|
||||||
# unfortunately we get a segfault in the PyQt5 test suite when pyside6 is installed (!?)
|
%ifnarch %power64 s390x
|
||||||
|
%bcond_without pyside2
|
||||||
|
%else
|
||||||
|
%bcond_with pyside2
|
||||||
|
%endif
|
||||||
|
# unfortunately we get a segfault in the other backends when pyside6 is installed at the same time (!?)
|
||||||
%bcond_with pyside6
|
%bcond_with pyside6
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python3-%{**}}
|
%{?!python_module:%define python_module() python3-%{**}}
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
Name: python-QtPy
|
Name: python-QtPy%{psuffix}
|
||||||
Version: 2.0.1
|
Version: 2.0.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Abstraction layer on top of Qt bindings
|
Summary: Abstraction layer on top of Qt bindings
|
||||||
@ -41,28 +56,37 @@ Requires: python-packaging
|
|||||||
# know what backend to recommend and what extras to require (e.g.
|
# know what backend to recommend and what extras to require (e.g.
|
||||||
# qtwebengine). Note that setup.py does not declare any requirements,
|
# qtwebengine). Note that setup.py does not declare any requirements,
|
||||||
# in this regard either.
|
# in this regard either.
|
||||||
BuildArch: noarch
|
%if %{with test}
|
||||||
# SECTION test requirements
|
|
||||||
BuildRequires: %{python_module pytest >= 6}
|
BuildRequires: %{python_module pytest >= 6}
|
||||||
BuildRequires: %{python_module pytest-qt}
|
BuildRequires: %{python_module pytest-qt}
|
||||||
|
%if %{with pyqt5}
|
||||||
BuildRequires: %{python_module qt3d-qt5}
|
BuildRequires: %{python_module qt3d-qt5}
|
||||||
BuildRequires: %{python_module qt5}
|
BuildRequires: %{python_module qt5}
|
||||||
BuildRequires: %{python_module qtcharts-qt5}
|
BuildRequires: %{python_module qtcharts-qt5}
|
||||||
BuildRequires: %{python_module qtdatavis3d-qt5}
|
BuildRequires: %{python_module qtdatavis3d-qt5}
|
||||||
|
%ifnarch %{power64} s390x
|
||||||
BuildRequires: %{python_module qtwebengine-qt5}
|
BuildRequires: %{python_module qtwebengine-qt5}
|
||||||
BuildRequires: python3-pyside2
|
%endif
|
||||||
|
%endif
|
||||||
%if %{with pyqt6}
|
%if %{with pyqt6}
|
||||||
BuildRequires: %{python_module PyQt6-3D}
|
BuildRequires: %{python_module PyQt6-3D}
|
||||||
BuildRequires: %{python_module PyQt6-Charts}
|
BuildRequires: %{python_module PyQt6-Charts}
|
||||||
BuildRequires: %{python_module PyQt6-DataVisualization}
|
BuildRequires: %{python_module PyQt6-DataVisualization}
|
||||||
BuildRequires: %{python_module PyQt6-WebEngine}
|
|
||||||
BuildRequires: %{python_module PyQt6}
|
BuildRequires: %{python_module PyQt6}
|
||||||
BuildRequires: qt6-sql-sqlite
|
BuildRequires: qt6-sql-sqlite
|
||||||
|
%ifnarch %{ix86} %{arm} %{power64} s390x
|
||||||
|
# QtWebEngine 6.3.0 ceased support for 32-bit
|
||||||
|
BuildRequires: %{python_module PyQt6-WebEngine}
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
%if %{with pyside2}
|
||||||
|
BuildRequires: python3-pyside2
|
||||||
%endif
|
%endif
|
||||||
%if %{with pyside6}
|
%if %{with pyside6}
|
||||||
BuildRequires: python3-pyside6
|
BuildRequires: python3-pyside6
|
||||||
|
BuildRequires: qt6-sql-sqlite
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
# /SECTION
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -86,36 +110,57 @@ sed -i '/skipif.*not PYSIDE2/ d' qtpy/tests/test_qtcharts.py
|
|||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if ! %{with test}
|
||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test}
|
||||||
export QT_HASH_SEED=0
|
export QT_HASH_SEED=0
|
||||||
export QT_QPA_PLATFORM="offscreen"
|
export QT_QPA_PLATFORM="offscreen"
|
||||||
mkdir empty
|
mkdir empty
|
||||||
pushd empty
|
pushd empty
|
||||||
# no QtOpenGL for these platforms in our PyQt5
|
%ifarch %{arm} aarch64
|
||||||
donttest=$(python3 -c 'import platform; print(" or test_qtopengl" if platform.processor() in ["armv7l", "aarch64"] else "")')
|
# no QtOpenGL for these platforms
|
||||||
|
donttest=" or test_qtopengl"
|
||||||
|
%endif
|
||||||
|
%if %{with pyqt5}
|
||||||
# no QtSensors in our PyQt5
|
# no QtSensors in our PyQt5
|
||||||
donttest_pyqt5=" or test_qtsensors"
|
donttest_pyqt5=" or test_qtsensors"
|
||||||
|
%ifarch %{power64} s390x
|
||||||
|
# No QtWebengine on ppc and s390x
|
||||||
|
donttest_pyqt5="${donttest_pyqt5} or test_qtwebengine or test_qt_api"
|
||||||
|
%endif
|
||||||
export QT_API=pyqt5 FORCE_QT_API=1
|
export QT_API=pyqt5 FORCE_QT_API=1
|
||||||
%pytest -rwEfs -v ../qtpy/tests/ -k "not (dummyprefix $donttest $donttest_pyqt5)"
|
%pytest -rwEfs -v ../qtpy/tests/ -k "not (dummyprefix $donttest $donttest_pyqt5)"
|
||||||
%if %{with pyqt6}
|
|
||||||
export QT_API=pyqt6 FORCE_QT_API=1
|
|
||||||
%pytest -rwEfs -v ../qtpy/tests/ -k "not (dummyprefix $donttest)"
|
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with pyqt6}
|
||||||
|
%ifarch %{ix86} %{arm} %{power64} s390x
|
||||||
|
# QtWebEngine 6.3.0 ceased support for 32-bit
|
||||||
|
# No QtWebengine (PyQt5 or PyqQt6 on ppc and s390x
|
||||||
|
donttest_pyqt6=" or test_qtwebengine"
|
||||||
|
%endif
|
||||||
|
export QT_API=pyqt6 FORCE_QT_API=1
|
||||||
|
%pytest -rwEfs -v ../qtpy/tests/ -k "not (dummyprefix $donttest $donttest_pyqt6)"
|
||||||
|
%endif
|
||||||
|
%if %{with pyside2}
|
||||||
export QT_API=pyside2 FORCE_QT_API=1
|
export QT_API=pyside2 FORCE_QT_API=1
|
||||||
pytest-%{python3_bin_suffix} -rwEfs -v ../qtpy/tests/ -k "not (dummyprefix $donttest)"
|
pytest-%{python3_bin_suffix} -rwEfs -v ../qtpy/tests/ -k "not (dummyprefix $donttest)"
|
||||||
|
%endif
|
||||||
%if %{with pyside6}
|
%if %{with pyside6}
|
||||||
export QT_API=pyside6 FORCE_QT_API=1
|
export QT_API=pyside6 FORCE_QT_API=1
|
||||||
pytest-%{python3_bin_suffix} -rwEfs -v ../qtpy/tests/ -k "not (dummyprefix $donttest)"
|
pytest-%{python3_bin_suffix} -rwEfs -v ../qtpy/tests/ -k "not (dummyprefix $donttest)"
|
||||||
%endif
|
%endif
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if ! %{with test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc AUTHORS.md CHANGELOG.md README.md
|
%doc AUTHORS.md CHANGELOG.md README.md
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%{python_sitelib}/qtpy
|
%{python_sitelib}/qtpy
|
||||||
%{python_sitelib}/QtPy-%{version}*-info
|
%{python_sitelib}/QtPy-%{version}*-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user