File python-qwt5.spec of Package python-qwt5
#
# spec file for package PyQwt5 (Version 5.2)
#
# created by Hans-Peter Jansen <hpj@urpla.net>
#
# Copyright (c) 2002-2010 LISA GmbH, Bingen, 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.
%define prjname PyQwt
Name: python-qwt5
License: GPL-2.0
Group: Development/Libraries/Python
Summary: Python bindings for Qwt (Qt Widgets for Technical applications)
BuildRequires: fdupes
BuildRequires: libqt4-devel >= 4.4
BuildRequires: python-devel >= 2.5
BuildRequires: python-numpy-devel
BuildRequires: python-qt4-devel >= 4.6
BuildRequires: python-sip-devel >= 4.9
BuildRequires: qwt-devel >= 5
Requires: python(abi) >= %{py_ver}
Requires: python-sip >= %( echo `rpm -q --queryformat '%{VERSION}' python-sip`)
Requires: python-qt4 >= %( echo `rpm -q --queryformat '%{VERSION}' python-qt4`)
Requires: python-numpy
Version: 5.2.0
Release: 1
Source0: %{prjname}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %suse_version <= 1110
%define python_sitelib %{py_sitedir}
%endif
%description
Requiress a set of Python bindings for the Qwt C++ class library which extends
the Qt framework with widgets for scientific and engineering applications. It
provides a widget to plot 2-dimensional data and various widgets to display and
control bounded or unbounded floating point values.
%package devel
Summary: Devel part of PyQwt (Qt Widgets for Technical applications)
Group: Development/Libraries/Python
Requires: libqt4-devel
Requires: python-devel
Requires: python-sip-devel
Requires: python-qt4-devel
Requires: qwt-devel
%description devel
Requiress a set of Python bindings for the Qwt C++ class library which extends
the Qt framework with widgets for scientific and engineering applications. It
provides a widget to plot 2-dimensional data and various widgets to display and
control bounded or unbounded floating point values.
%prep
%setup -q -n %{prjname}-%{version}
%build
pushd configure
# generate sip tracable code with debug symbols for Qt4
CFLAGS="%{optflags}" python configure.py --debug --qt4 -I%{_includedir}/qwt5/ -lqwt
make %{?jobs:-j %jobs}
popd
%install
pushd configure
%makeinstall
# compatibility symlink (sip files for debug package)
ln -s ../sip
popd
# tidying
chmod +x %{buildroot}/%{py_sitedir}/PyQt4/Qwt5/{grace.py,qplt.py}
mv qt4examples examples
# doc
echo > README << EOF
The documentation for %{prjname} is located in package %{name}-devel.
EOF
# copy docs manually in order to let fdupes succeed
DOCDIR=%{buildroot}%{_docdir}/%{name}-devel
mkdir -p $DOCDIR
test -d sphinx/build && {
# move doc in place
mv sphinx/build/* .
rm -f html/.buildinfo
mv latex/PyQwt.pdf .
cp -pr PyQwt.pdf html latex $DOCDIR
}
cp -pr examples $DOCDIR
%fdupes $DOCDIR
%files
%defattr(-,root,root)
%doc ANNOUNCEMENT-%{version} COPYING* README
%dir %{py_sitedir}/PyQt4/Qwt5
%{py_sitedir}/PyQt4/Qwt5/
%{py_sitedir}/PyQt4/uic
%files devel
%defattr(-,root,root)
%{_docdir}/python-qwt5-devel
%{_datadir}/sip/PyQt4/Qwt5/
%changelog