File python-PythonQwt.spec of Package python-PythonQwt

# spec file for package python-PythonQwt
# Copyright (c) 2016 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

Name:           python-PythonQwt
Version:        0.5.5
Release:        0
Summary:        Qt plotting widgets for Python
License:        MIT
Group:          Development/Languages/Python
BuildRequires:  python-devel
BuildRequires:  python-numpy-devel
BuildRequires:  python-setuptools
BuildRequires:  unzip
Requires:       python-numpy
%if 0%{?suse_version} && 0%{?suse_version} < 1320
BuildRequires:  python-qt4
Requires:       python-qt4
BuildRequires:  python-qt5
Requires:       python-qt5
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
BuildArch:      noarch

The PythonQwt package is a 2D-data plotting library using Qt graphical user
interfaces for the Python programming language. It is compatible with both
PyQt4 and PyQt5 (PySide is currently not supported but it could be in the near
future as it would “only” requires testing to support it as a stable
alternative to PyQt).

The PythonQwt project was initiated to solve -at least temporarily- the
obsolescence issue of PyQwt (the Python-Qwt C++ bindings library) which is no
longer maintained. The idea was to translate the original Qwt C++ code to
Python and then to optimize some parts of the code by writing new modules based
on NumPy and other libraries.

The PythonQwt package consists of a single Python package named qwt which is a
pure Python implementation of Qwt C++ library with some limitations: efforts
were concentrated on basic plotting features, leaving higher level features to
the guiqwt library.

%setup -q -n PythonQwt-%{version}
# Fix wrong file end-of-line encoding
sed -i 's/\r$//'
sed -i 's/\r$//' LICENSE
sed -i 's/\r$//'

python build

python install --prefix=%{_prefix} --root=%{buildroot}

rm %{buildroot}%{_bindir}/PythonQwt-tests-*