Blob Blame History Raw
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name: gnuplot-py
Version: 1.8
Release: 12%{?dist}
Summary: Python interface to Gnuplot

Group: Development/Languages
License: LGPLv2+

URL: http://gnuplot-py.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
BuildRoot:  %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: numpy
Requires: gnuplot
Requires: numpy

%description
Gnuplot.py is a Python package that interfaces to gnuplot, the popular 
open-source plotting program. It allows you to use gnuplot from within 
Python to plot arrays of data from memory, data files, or mathematical 
functions. 

%prep
%setup -q
# Removing the shebang
# http://sourceforge.net/tracker2/?func=detail&aid=2127867&group_id=17434&atid=117434
for F in utils.py __init__.py funcutils.py; do
 %{__sed} -i.orig -e 1d ${F}
 touch -r ${F}.orig ${F}
 %{__rm} ${F}.orig
done
%{__chmod} 644 test.py demo.py

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} -c 'import setuptools; execfile("setup.py")' build

%install
%{__rm} -fr %{buildroot}
%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot}

# These two are used by developers only, see
# http://sourceforge.net/tracker2/?func=detail&aid=2127867&group_id=17434&atid=117434
# They will go to doc
%{__rm} %{buildroot}%{python_sitelib}/Gnuplot/demo.py*
%{__rm} %{buildroot}%{python_sitelib}/Gnuplot/test.py*
# This isn't needed
%{__rm} %{buildroot}%{python_sitelib}/Gnuplot/setup.py*

%clean
%{__rm} -fr %{buildroot}

%files
%defattr(-,root,root,-)
%doc ANNOUNCE.txt CREDITS.txt FAQ.txt LICENSE.txt NEWS.txt README.txt TODO.txt doc/Gnuplot test.py demo.py
%{python_sitelib}/*

%changelog
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1.8-9
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Dec 06 2008 Sergio Pascual <sergiopr at fedoraproject.org> - 1.8-6
- Providing eggs
- Docs in Gnuplot dir
- Added txt docs
- Removed setup.py from installed files

* Sun Nov 02 2008 Sergio Pascual <sergiopr at fedoraproject.org> - 1.8-5
- Url in source
- demo-py and test.py go to %%doc

* Fri Oct 03 2008 Sergio Pascual <sergiopr at fedoraproject.org> - 1.8-4
- Directory doc goes to %%doc

* Fri Oct 03 2008 Sergio Pascual <sergiopr at fedoraproject.org> - 1.8-3
- Build requires numpy

* Wed Sep 24 2008 Sergio Pascual <sergiopr at fedoraproject.org> - 1.8-2
- Removing the shebang doesn't change the timestamps of the files
- Filled a bug upstream about the shebang 

* Mon Sep 22 2008 Sergio Pascual <sergiopr at fedoraproject.org> - 1.8-1
- Initial specfile