d6ef45d
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
d6ef45d
d6ef45d
Name:           PyQwt
96d6132
Version:        5.2.0
f8ee7d1
Release:        7%{?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
96d6132
BuildRequires:  numpy-f2py
d6ef45d
BuildRequires:  qwt-devel
d6ef45d
d6ef45d
Requires:       PyQt4
d6ef45d
Requires:       numpy
07fa483
%{?_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
96d6132
# move the generated pdf and html documentation to sphinx directory and remove the build files
96d6132
cd ..
96d6132
mv sphinx/build/latex/PyQwt.pdf sphinx
07fa483
rm sphinx/build/html/.buildinfo
96d6132
mv sphinx/build/html sphinx
96d6132
rm -rf sphinx/build
d6ef45d
96d6132
# non-executable scripts
d6ef45d
chmod 755 %{buildroot}/%{python_sitearch}/PyQt4/Qwt5/grace.py
96d6132
chmod 755 %{buildroot}/%{python_sitearch}/PyQt4/Qwt5/qplt.py
96d6132
96d6132
#FIXME!!! temporarily remove qwt.py* files which conflict with PyQt4 package
96d6132
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*
96d6132
%{python_sitearch}/PyQt4/*
d6ef45d
d6ef45d
%files devel
d6ef45d
%defattr(-,root,root,-)
96d6132
%doc sphinx/*
d6ef45d
%doc qt4examples/ 
d6ef45d
%{_datadir}/sip/PyQt4/Qwt5/
d6ef45d
d6ef45d
%changelog
f8ee7d1
* Thu Apr 22 2010 Tadej Janež <tadej.janez@tadej.hicsalta.si> - 5.2.0-7
f8ee7d1
- another rebuild (for qwt-5.2.1, f11+)
f8ee7d1
f83a63e
* Mon Apr 19 2010 Tadej Janež <tadej.janez@tadej.hicsalta.si> - 5.2.0-6
f83a63e
- rebuild (for qwt-5.2.1, f11+)
f83a63e
679a660
* Mon Apr 12 2010 Tadej Janež <tadej.janez@tadej.hicsalta.si> - 5.2.0-5
679a660
- rebuild (for qwt-5.2.0, f11+)
679a660
760740e
* Wed Feb 10 2010 Kevin Kofler <Kevin@tigcc.ticalc.org> 5.2.0-4
760740e
- rebuild for sip 4.10
760740e
07fa483
* Tue Nov 17 2009 Tadej Janež <tadej.janez@tadej.hicsalta.si> 5.2.0-2
07fa483
- Requires: sip-api(%%_sip_api_major) >= %%_sip_api (#537894)
07fa483
- Rebuilt for new sip-4.9.x (and PyQt4-4.6.x)
07fa483
- Removed html/.buildinfo from sphinx documentation (to fix a rpmlint error)
07fa483
96d6132
* Wed Sep 23 2009 Tadej Janež <tadej.janez@tadej.hicsalta.si> 5.2.0-1
96d6132
- upgrade to version 5.2.0, which supports newer versions of Qwt, PyQt4
96d6132
  and SIP (fixes RH bug #520095)
cfb2940
- included new Sphinx generated pdf and html documentation in -devel subpackage
96d6132
- made qplt.py executable (to fix a rpmlint error)
96d6132
- changed BuildRequires from numpy to numpy-f2py to cope with the numpy
96d6132
  package split
96d6132
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