python-QtPy/python-QtPy.spec
Todd R ca6fa6db57 Accepting request 519186 from home:TheBlackCat:branches:devel:languages:python
- Update to Version 1.3.1
  + Bugs fixed
    * Spurious cache files in PyPI tarball
    * Importing qtpy should not raise exceptions
    * No cache files included in the release tarball
    * Remove Quantified Code badge because the service doesn't exist anymore
    * Warn if QHeaderView deprecated methods are used
- Update to Version 1.3
  + New features
    * Add support for PySide2
    * Add support for QtMultimedia
    * Add support for PyQt 4.6
  + Bugs fixed
    * Typo in readme title
    * Update Readme for 1.3 release
    * Add tests for untested modules
    * Missing: QtOpenGL Module
    * QDesktopServices split into QDesktopServices and QStandardPaths
    * qInstallMessageHandler <-> qInstallMsgHandler
    * Feature Request: PySide2 support
    * Fix typo in Readme.
    * Add compatibility for the rename of qInstallMsgHandler to qInstallMessageHandler
    * Update Readme to reflect that we actually use the PySide2 layout
    * Update Readme to mention that we now support PySide2.
    * Add tests for Qtdesigner, QtNetwork, QtPrintSupport, QtSvg and QtTest.
    * Follow QStandardPaths location in Qt5 for PyQt4/PySide
    * Add a coveragerc file
    * Add support for PyQt 4.6
    * Add a new QtOpenGL module
    * Add PySide2 support

OBS-URL: https://build.opensuse.org/request/show/519186
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-QtPy?expand=0&rev=3
2017-08-28 16:40:48 +00:00

81 lines
2.5 KiB
RPMSpec

#
# spec file for package python-QtPy
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
%bcond_without test
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-QtPy
Version: 1.3.1
Release: 0
License: MIT
Summary: Abstraction layer on top of Qt bindings
Url: https://github.com/spyder-ide/qtpy
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/Q/QtPy/QtPy-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module qt5}
BuildRequires: %{python_module sip}
%if %{with test}
BuildRequires: %{python_module pytest}
%endif
Requires: python-qt5
Requires: python-sip
BuildArch: noarch
%python_subpackages
%description
QtPy (pronounced 'cutie pie') is a small abstraction layer that lets you
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
the QtGui module has been split into QtGui and QtWidgets).
Basically, you write your code as if you were using PyQt5 but import qt from
`qtpy` instead of `PyQt5`.
%prep
%setup -q -n QtPy-%{version}
sed -i 's/\r$//' LICENSE.txt
%build
%python_build
%install
%python_install
%{python_expand chmod a+x %{buildroot}%{$python_sitelib}/qtpy/tests/runtests.py
sed -i "s|^#!/usr/bin/env python$|#!%__$python|" %{buildroot}%{$python_sitelib}/qtpy/tests/runtests.py
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/qtpy/tests/
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/qtpy/tests/
%fdupes %{buildroot}%{$python_sitelib}
}
%if %{with test}
%check
%python_exec setup.py test
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.txt
%{python_sitelib}/*
%changelog