Blob Blame Raw
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:           PyQwt
Version:        5.2.0
Release:        2%{?dist}
Summary:        Python bindings for Qwt

Group:          Development/Languages
# GPLv2+ exceptions (see COPYING.PyQwt)
License:        GPLv2+ with exceptions
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  python-devel
BuildRequires:  sip-devel
BuildRequires:  PyQt4-devel
BuildRequires:  numpy-f2py
BuildRequires:  qwt-devel

Requires:       PyQt4
Requires:       numpy

PyQwt is 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: Files needed to build other bindings on PyQwt
Group:   Development/Languages
Requires: %{name} = %{version}-%{release}
Requires: PyQt4-devel
Requires: qwt-devel
%description devel
Files needed to build other bindings for Qwt C++ classes that inherit from
any of the PyQwt classes.

%setup -q

# mark examples non-executable
find qt4examples/ -name "*.py" | xargs chmod a-x

cd configure
%{__python} -I$QWTDIR -lqwt --disable-numarray --disable-numeric
make %{?_smp_mflags}

rm -rf %{buildroot}
cd configure
make DESTDIR=%{buildroot} install
# move the generated pdf and html documentation to sphinx directory and remove the build files
cd ..
mv sphinx/build/latex/PyQwt.pdf sphinx
rm sphinx/build/html/.buildinfo
mv sphinx/build/html sphinx
rm -rf sphinx/build

# non-executable scripts
chmod 755 %{buildroot}/%{python_sitearch}/PyQt4/Qwt5/
chmod 755 %{buildroot}/%{python_sitearch}/PyQt4/Qwt5/

#FIXME!!! temporarily remove* files which conflict with PyQt4 package
rm -rf %{buildroot}/%{python_sitearch}/PyQt4/uic
rm -rf %{buildroot}


%files devel
%doc sphinx/*
%doc qt4examples/ 

* Wed Oct 28 2009 Tadej Jane탑 <> 5.2.0-2
- made executable (to fix a rpmlint error)
- removed html/.buildinfo from sphinx documentation (to fix a rpmlint error)
- changed BuildRequires from numpy to numpy-f2py to cope with the numpy
  package split
- temporarily removed* files which conflict with the ones provided
  by the PyQt4 package

* Sun Sep  6 2009 Milos Jakubicek <> - 5.2.0-1
- Fix FTBFS: Update to 5.2.0

* Fri Jul 24 2009 Fedora Release Engineering <> - 5.1.0-5
- Rebuilt for

* Mon Feb 23 2009 Fedora Release Engineering <> - 5.1.0-4
- Rebuilt for

* Sat Jan 24 2009 Tadej Jane탑 <> 5.1.0-3
- made executable again

* Fri Jan 09 2009 Tadej Jane탑 <> 5.1.0-2
- disabled support for Numeric and Numarray
- incorporated fixes from package review in BZ472229

* Tue Nov 18 2008 Tadej Jane탑 <> 5.1.0-1
- initial package