Accepting request 980673 from home:bnavigator:branches:devel:languages:python
- Update to 2.1.0 * PR: Restrict broken Pytest versions to those not affected by the Pytest 7.0.0 import-mode=importlib behavior regression by @CAM-Gerlach in #324 * PR: Monkey patch pyside2uic UIParser.readResources for Python 3.9 compatibility by @n-elie in #325 * PR: Add missing QWebEngineScript support for PyQt5/6 and PySide2/6 by @EasyIsrael in #326 * PR: Add missing Qt.MidButton on PyQt6 by @dalthviz in #328 * PR: Drop support for Python 3.6 by @dalthviz in #329 * PR: Fix typo in constant name by @eyllanesc in #330 * PR: Use QFileDialog.Option to be compatiable with Qt6 by @frmdstryr in #331 * PR: Skip import of QOpenGLTime* on architectures where not available by @juliangilbey in #333 * PR: Remove QHeaderView patch related files by @dalthviz in #334 * PR: Fix uic skipped tests and PyQt 6.3.0 segfaulting tests by @dalthviz in #335 * PR: Add command line support for Mypy by @CAM-Gerlach in #337 * PR: Add workaround for mode argument in QTextCursor.movePosition (Pyside2) by @rear1019 in #341 * PR: Fix bug with environ handling by @larsoner in #340 * PR: Change bindings try order to be PyQt5, PySide2, PyQt6, PySide6 by @dalthviz in #343 OBS-URL: https://build.opensuse.org/request/show/980673 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-QtPy?expand=0&rev=36
This commit is contained in:
parent
1e4da8b3c4
commit
5a0185ea86
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:adfd073ffbd2de81dc7aaa0b983499ef5c59c96adcfdcc9dea60d42ca885eb8f
|
|
||||||
size 43047
|
|
3
QtPy-2.1.0.tar.gz
Normal file
3
QtPy-2.1.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ca8cd4217175186344299ee4c0f7e7adcf362c70852ba35b255a534077025c06
|
||||||
|
size 46470
|
@ -1,3 +1,31 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 3 19:09:24 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update to 2.1.0
|
||||||
|
* PR: Restrict broken Pytest versions to those not affected by
|
||||||
|
the Pytest 7.0.0 import-mode=importlib behavior regression by
|
||||||
|
@CAM-Gerlach in #324
|
||||||
|
* PR: Monkey patch pyside2uic UIParser.readResources for Python
|
||||||
|
3.9 compatibility by @n-elie in #325
|
||||||
|
* PR: Add missing QWebEngineScript support for PyQt5/6 and
|
||||||
|
PySide2/6 by @EasyIsrael in #326
|
||||||
|
* PR: Add missing Qt.MidButton on PyQt6 by @dalthviz in #328
|
||||||
|
* PR: Drop support for Python 3.6 by @dalthviz in #329
|
||||||
|
* PR: Fix typo in constant name by @eyllanesc in #330
|
||||||
|
* PR: Use QFileDialog.Option to be compatiable with Qt6 by
|
||||||
|
@frmdstryr in #331
|
||||||
|
* PR: Skip import of QOpenGLTime* on architectures where not
|
||||||
|
available by @juliangilbey in #333
|
||||||
|
* PR: Remove QHeaderView patch related files by @dalthviz in #334
|
||||||
|
* PR: Fix uic skipped tests and PyQt 6.3.0 segfaulting tests by
|
||||||
|
@dalthviz in #335
|
||||||
|
* PR: Add command line support for Mypy by @CAM-Gerlach in #337
|
||||||
|
* PR: Add workaround for mode argument in
|
||||||
|
QTextCursor.movePosition (Pyside2) by @rear1019 in #341
|
||||||
|
* PR: Fix bug with environ handling by @larsoner in #340
|
||||||
|
* PR: Change bindings try order to be PyQt5, PySide2, PyQt6,
|
||||||
|
PySide6 by @dalthviz in #343
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Apr 11 08:03:56 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
Mon Apr 11 08:03:56 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -33,30 +33,34 @@ BuildArch: noarch
|
|||||||
%bcond_with pyside2
|
%bcond_with pyside2
|
||||||
%endif
|
%endif
|
||||||
# unfortunately we get a segfault in the other backends when pyside6 is installed at the same time (!?)
|
# unfortunately we get a segfault in the other backends when pyside6 is installed at the same time (!?)
|
||||||
|
# test locally: osc build -M test --with pyside6 --without pyside2 --without pyqt5 --without pyqt6 --define "pythons python3"
|
||||||
%bcond_with pyside6
|
%bcond_with pyside6
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python3-%{**}}
|
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
Name: python-QtPy%{psuffix}
|
Name: python-QtPy%{psuffix}
|
||||||
Version: 2.0.1
|
Version: 2.1.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Abstraction layer on top of Qt bindings
|
Summary: Abstraction layer on top of Qt bindings
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/spyder-ide/qtpy
|
URL: https://github.com/spyder-ide/qtpy
|
||||||
Source: https://files.pythonhosted.org/packages/source/Q/QtPy/QtPy-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/Q/QtPy/QtPy-%{version}.tar.gz
|
||||||
|
BuildRequires: %{python_module base >= 3.7}
|
||||||
BuildRequires: %{python_module packaging}
|
BuildRequires: %{python_module packaging}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-packaging
|
Requires: python-packaging
|
||||||
# Note: Don't add any Requires, Recommends, or Suggests here,
|
Requires(post): update-alternatives
|
||||||
# because we need to minimize the space occupied on the
|
Requires(postun):update-alternatives
|
||||||
# Tumbleweed DVD. The application importing QtPy will have to
|
# Note: Don't add any Requires, Recommends, or Suggests for a
|
||||||
# know what backend to recommend and what extras to require (e.g.
|
# specific backend here, because we need to minimize the space
|
||||||
# qtwebengine). Note that setup.py does not declare any requirements,
|
# occupied on the Tumbleweed DVD. The application importing QtPy
|
||||||
# in this regard either.
|
# will have to know what backend to recommend and what extras to
|
||||||
|
# require (e.g. qtwebengine). Note that setup.py does not declare
|
||||||
|
# any requirements, in this regard either.
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
|
BuildRequires: %{python_module QtPy = %{version}}
|
||||||
BuildRequires: %{python_module pytest >= 6}
|
BuildRequires: %{python_module pytest >= 6}
|
||||||
BuildRequires: %{python_module pytest-qt}
|
BuildRequires: %{python_module pytest-qt}
|
||||||
%if %{with pyqt5}
|
%if %{with pyqt5}
|
||||||
@ -93,11 +97,11 @@ BuildRequires: qt6-sql-sqlite
|
|||||||
QtPy is a small abstraction layer that lets you
|
QtPy is a small abstraction layer that lets you
|
||||||
write applications using a single API call to either PyQt or PySide.
|
write applications using a single API call to either PyQt or PySide.
|
||||||
|
|
||||||
It provides support for PyQt5, PyQt4 and PySide using the PyQt5 layout (where
|
It provides support for PyQt5, PyQt6, PySide6, PySide2 using the Qt5
|
||||||
the QtGui module has been split into QtGui and QtWidgets).
|
layout (where the QtGui module has been split into QtGui and QtWidgets).
|
||||||
|
Basically, you can write your code as if you were using PyQt or PySide
|
||||||
Basically, you can write your code as if you were using PySide2 but import Qt
|
directly, but import Qt modules from qtpy instead of PyQt5, PySide2,
|
||||||
modules from qtpy instead of PySide2 (or PyQt5)
|
PyQt6 or PySide6.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n QtPy-%{version}
|
%setup -q -n QtPy-%{version}
|
||||||
@ -105,6 +109,7 @@ modules from qtpy instead of PySide2 (or PyQt5)
|
|||||||
sed -i 's/\r$//' LICENSE.txt *.md
|
sed -i 's/\r$//' LICENSE.txt *.md
|
||||||
# qtcharts is present in our PyQt
|
# qtcharts is present in our PyQt
|
||||||
sed -i '/skipif.*not PYSIDE2/ d' qtpy/tests/test_qtcharts.py
|
sed -i '/skipif.*not PYSIDE2/ d' qtpy/tests/test_qtcharts.py
|
||||||
|
sed -i '/addopts/ s/--cov=.*//' pytest.ini
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@ -112,6 +117,7 @@ sed -i '/skipif.*not PYSIDE2/ d' qtpy/tests/test_qtcharts.py
|
|||||||
%install
|
%install
|
||||||
%if ! %{with test}
|
%if ! %{with test}
|
||||||
%python_install
|
%python_install
|
||||||
|
%python_clone -a %{buildroot}%{_bindir}/qtpy
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -121,6 +127,8 @@ export QT_HASH_SEED=0
|
|||||||
export QT_QPA_PLATFORM="offscreen"
|
export QT_QPA_PLATFORM="offscreen"
|
||||||
mkdir empty
|
mkdir empty
|
||||||
pushd empty
|
pushd empty
|
||||||
|
# expects an unset FORCE_QT_API
|
||||||
|
donttest_qt_api="test_qt_api_environ"
|
||||||
%ifarch %{arm} aarch64
|
%ifarch %{arm} aarch64
|
||||||
# no QtOpenGL for these platforms
|
# no QtOpenGL for these platforms
|
||||||
donttest=" or test_qtopengl"
|
donttest=" or test_qtopengl"
|
||||||
@ -133,7 +141,7 @@ donttest_pyqt5=" or test_qtsensors"
|
|||||||
donttest_pyqt5="${donttest_pyqt5} or test_qtwebengine or test_qt_api"
|
donttest_pyqt5="${donttest_pyqt5} or test_qtwebengine or test_qt_api"
|
||||||
%endif
|
%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 -k "not ($donttest_qt_api $donttest $donttest_pyqt5)"
|
||||||
%endif
|
%endif
|
||||||
%if %{with pyqt6}
|
%if %{with pyqt6}
|
||||||
%ifarch %{ix86} %{arm} %{power64} s390x
|
%ifarch %{ix86} %{arm} %{power64} s390x
|
||||||
@ -142,25 +150,36 @@ export QT_API=pyqt5 FORCE_QT_API=1
|
|||||||
donttest_pyqt6=" or test_qtwebengine"
|
donttest_pyqt6=" or test_qtwebengine"
|
||||||
%endif
|
%endif
|
||||||
export QT_API=pyqt6 FORCE_QT_API=1
|
export QT_API=pyqt6 FORCE_QT_API=1
|
||||||
%pytest -rwEfs -v ../qtpy/tests/ -k "not (dummyprefix $donttest $donttest_pyqt6)"
|
%pytest -rwEfs -v ../qtpy -k "not ($donttest_qt_api $donttest $donttest_pyqt6)"
|
||||||
%endif
|
%endif
|
||||||
%if %{with pyside2}
|
%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 -k "not ($donttest_qt_api $donttest)"
|
||||||
%endif
|
%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 -k "not ($donttest_qt_api $donttest)"
|
||||||
%endif
|
%endif
|
||||||
|
# Default backend
|
||||||
|
unset QT_API
|
||||||
|
unset FORCE_QT_API
|
||||||
|
%pytest -rwEfs -vvv ../qtpy -k "not (dummyprefix $donttest $donttest_pyqt5)"
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative qtpy
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative qtpy
|
||||||
|
|
||||||
%if ! %{with test}
|
%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
|
||||||
|
%python_alternative %{_bindir}/qtpy
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user