Files
python-QtPy/python-QtPy.spec
Todd R 1455a93702 Accepting request 647644 from home:TheBlackCat:branches:devel:languages:python
- Update to Version 1.5.2
  * Fix tests
  * Add support for PySide2.QtOpenGL 
- Update to Version 1.5.1
  * Make PythonQtError inherit from RuntimeError to be easily
    catchable
- Update to Version 1.5
  + New features 
    * Add support for QtLocation, QtMultimediaWidgets, QtQml,
      QtQuick, QtWebChannel, QtWebSockets and QtXmlPatterns.
    * Raise an error when trying to use the wrong combination of
      macOS and Qt versions. 
  + Issues Closed 
    * Issue 155 - Add warnings for Qt 5.9 in macOS 10.9 and
      Qt 5.11 and macOS 10.11 (PR 168)
    * Issue 153 - Shim PyQt5 ToPyDateTime for compatibility with
      PySide2 (PR 169)
    * Issue 123 - Wrap QWebChannel module (PR 157) 
  + Pull Requests Merged 
    * PR 169 - Shim PyQt5 QDateTime.toPyDateTime to
      QDateTime.toPython for compatibility with PySide2 (153)
    * PR 168 - Raise error when trying to use the wrong
      combination of macOS and Qt versions (155)
    * PR 167 - Migrate to CircleCI 2.0
    * PR 163 - Add QtLocation
    * PR 162 - Update readme to remove funding appeal, harmonize
      with other readmes and minor fixes
    * PR 161 - Fix pyside2 wheels install
    * PR 157 - Add more Qt modules (123)

OBS-URL: https://build.opensuse.org/request/show/647644
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-QtPy?expand=0&rev=9
2018-11-09 17:47:25 +00:00

86 lines
2.8 KiB
RPMSpec

#
# spec file for package python-QtPy
#
# Copyright (c) 2018 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/
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-QtPy
Version: 1.5.2
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: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module qt5}
BuildRequires: %{python_module sip}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: xvfb-run
# SECTION test requirements
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest}
# /SECTION
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}
}
%check
export QT_HASH_SEED=0
export PYTHONDONTWRITEBYTECODE=1
mkdir empty
pushd empty
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
xvfb-run --server-args="-screen 0 1920x1080x24" py.test-%{$python_bin_suffix} ../qtpy/tests/
}
popd
%files %{python_files}
%doc AUTHORS.md CHANGELOG.md README.md
%license LICENSE.txt
%{python_sitelib}/*
%changelog