A new user interface for you! Read more...

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 http://bugs.opensuse.org/
#


Name:           python-PythonQwt
Version:        0.5.5
Release:        0
Summary:        Qt plotting widgets for Python
License:        MIT
Group:          Development/Languages/Python
Url:            http://pypi.python.org/pypi/PythonQwt/
Source:         https://pypi.python.org/packages/source/P/PythonQwt/PythonQwt-%{version}.zip
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
%else
BuildRequires:  python-qt5
Requires:       python-qt5
%endif
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()")}
%else
BuildArch:      noarch
%endif

%description
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.

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

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

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

%files
%defattr(-,root,root,-)
%doc CHANGELOG.md LICENSE README.md
%{python_sitelib}/qwt/
%{python_sitelib}/PythonQwt-%{version}-py*.egg-info

%changelog