d6ef45d
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
d6ef45d
d6ef45d
Name:           PyQwt
e034652
Version:        5.2.0
e75e307
Release:        5%{?dist}
d6ef45d
Summary:        Python bindings for Qwt
d6ef45d
d6ef45d
Group:          Development/Languages
d6ef45d
# GPLv2+ exceptions (see COPYING.PyQwt)
d6ef45d
License:        GPLv2+ with exceptions
d6ef45d
URL:            http://pyqwt.sourceforge.net/
d6ef45d
Source0:        http://downloads.sourceforge.net/pyqwt/%{name}-%{version}.tar.gz
d6ef45d
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
d6ef45d
d6ef45d
BuildRequires:  python-devel
d6ef45d
BuildRequires:  sip-devel
d6ef45d
BuildRequires:  PyQt4-devel
e6a1ef9
BuildRequires:  numpy-f2py
d6ef45d
BuildRequires:  qwt-devel
d6ef45d
d6ef45d
Requires:       PyQt4
d6ef45d
Requires:       numpy
16c5e23
%{?_sip_api:Requires: sip-api(%{_sip_api_major}) >= %{_sip_api}}
d6ef45d
d6ef45d
%description
d6ef45d
PyQwt is a set of Python bindings for the Qwt C++ class library which extends
d6ef45d
the Qt framework with widgets for scientific and engineering applications. It
d6ef45d
provides a widget to plot 2-dimensional data and various widgets to display and
d6ef45d
control bounded or unbounded floating point values.
d6ef45d
d6ef45d
%package devel
d6ef45d
Summary: Files needed to build other bindings on PyQwt
d6ef45d
Group:   Development/Languages
d6ef45d
Requires: %{name} = %{version}-%{release}
d6ef45d
Requires: PyQt4-devel
d6ef45d
Requires: qwt-devel
d6ef45d
%description devel
d6ef45d
Files needed to build other bindings for Qwt C++ classes that inherit from
d6ef45d
any of the PyQwt classes.
d6ef45d
d6ef45d
%prep
d6ef45d
%setup -q
d6ef45d
d6ef45d
# mark examples non-executable
d6ef45d
find qt4examples/ -name "*.py" | xargs chmod a-x
d6ef45d
d6ef45d
%build
d6ef45d
QWTDIR=%{_includedir}/qwt
d6ef45d
cd configure
d6ef45d
%{__python} configure.py -I$QWTDIR -lqwt --disable-numarray --disable-numeric
d6ef45d
make %{?_smp_mflags}
d6ef45d
d6ef45d
%install
d6ef45d
rm -rf %{buildroot}
d6ef45d
cd configure
d6ef45d
make DESTDIR=%{buildroot} install
e6a1ef9
# move the generated pdf and html documentation to sphinx directory and remove the build files
e034652
cd ..
e034652
mv sphinx/build/latex/PyQwt.pdf sphinx
e6a1ef9
rm sphinx/build/html/.buildinfo
e034652
mv sphinx/build/html sphinx
e034652
rm -rf sphinx/build
d6ef45d
e6a1ef9
# non-executable scripts
d6ef45d
chmod 755 %{buildroot}/%{python_sitearch}/PyQt4/Qwt5/grace.py
e6a1ef9
chmod 755 %{buildroot}/%{python_sitearch}/PyQt4/Qwt5/qplt.py
e6a1ef9
e6a1ef9
#FIXME!!! temporarily remove qwt.py* files which conflict with PyQt4 package
e6a1ef9
rm -rf %{buildroot}/%{python_sitearch}/PyQt4/uic
d6ef45d
 
d6ef45d
%clean
d6ef45d
rm -rf %{buildroot}
d6ef45d
d6ef45d
d6ef45d
%files
d6ef45d
%defattr(-,root,root,-)
d6ef45d
%doc ANNOUNCEMENT-%{version} README
d6ef45d
%doc COPYING*
e034652
%{python_sitearch}/PyQt4/*
d6ef45d
d6ef45d
%files devel
d6ef45d
%defattr(-,root,root,-)
e034652
%doc sphinx/*
d6ef45d
%doc qt4examples/ 
d6ef45d
%{_datadir}/sip/PyQt4/Qwt5/
d6ef45d
d6ef45d
%changelog
e75e307
* Mon Apr 12 2010 Tadej Janež <tadej.janez@tadej.hicsalta.si> - 5.2.0-5
e75e307
- rebuild (for qwt-5.2.0, f11+)
e75e307
04ba83e
* Thu Jan 07 2010 Rex Dieter <rdieter@fedoraproject.org> - 5.2.0-4 
04ba83e
- rebuild (sip)
04ba83e
2b55e4e
* Thu Nov 19 2009 Rex Dieter <rdieter@fedoraproject.org> - 5.2.0-3.1 
2b55e4e
- rebuild (for qt-4.6.0-rc1, f13+)
2b55e4e
16c5e23
* Mon Nov 16 2009 Rex Dieter <rdieter@fedoraproject.org> 5.2.0-3
16c5e23
- Requires: sip-api(%%_sip_api_major) >= %%_sip_api (#537894)
16c5e23
e6a1ef9
* Wed Oct 28 2009 Tadej Janež <tadej.janez@tadej.hicsalta.si> 5.2.0-2
e6a1ef9
- made qplt.py executable (to fix a rpmlint error)
e6a1ef9
- removed html/.buildinfo from sphinx documentation (to fix a rpmlint error)
e6a1ef9
- changed BuildRequires from numpy to numpy-f2py to cope with the numpy
e6a1ef9
  package split
e6a1ef9
- temporarily removed qwt.py* files which conflict with the ones provided
e6a1ef9
  by the PyQt4 package
e6a1ef9
e034652
* Sun Sep  6 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 5.2.0-1
e034652
- Fix FTBFS: Update to 5.2.0
e034652
d8b15fd
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.0-5
d8b15fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
d8b15fd
eddfdbc
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.0-4
eddfdbc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
eddfdbc
d6ef45d
* Sat Jan 24 2009 Tadej Janež <tadej.janez@tadej.hicsalta.si> 5.1.0-3
d6ef45d
- made grace.py executable again
d6ef45d
d6ef45d
* Fri Jan 09 2009 Tadej Janež <tadej.janez@tadej.hicsalta.si> 5.1.0-2
d6ef45d
- disabled support for Numeric and Numarray
d6ef45d
- incorporated fixes from package review in BZ472229
d6ef45d
d6ef45d
* Tue Nov 18 2008 Tadej Janež <tadej.janez@tadej.hicsalta.si> 5.1.0-1
d6ef45d
- initial package