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

Name:          bpython
Summary:       Fancy curses interface to the Python interactive interpreter
Version:       0.9.6.2
Release:       2%{?dist}
URL:           http://www.bpython-interpreter.org/
Group:         Development/Libraries
License:       MIT
Source0:       http://www.bpython-interpreter.org/releases/bpython-%{version}.tar.gz
BuildArch:     noarch
BuildRequires: python-devel python-setuptools desktop-file-utils
Requires:      python-pygments pyparsing
BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
bpython is a fancy interface to the Python interpreter for Unix-like
operating systems. It has the following features:
 o in-line syntax highlighting
 o readline-like autocomplete with suggestions displayed as you type
 o expected parameter list for any Python function.
 o eewind function to pop the last line of code from memory and
   re-evaluate.
 o send the code you've entered off to a pastebin and display the
   pastebin URL for copying, etc.  
 o save the code you've entered to a file
 o auto indentation

%prep
%setup -q
%{__sed} -i -e \
    "s|/usr/share/docs/bpython/examples on Debian|%{_docdir}/%{name}-%{version}/sample-config on Fedora/RHEL|g" doc/bpython.1
%{__sed} -i -e '1d' bpython/{cli,keys}.py

%build
%{__python} setup.py build

%install
%{__rm} -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%{__rm} -f %{buildroot}%{_datadir}/applications/%{name}.desktop

# Leave this out for now, 0.9.7 will ship a stable gtk version
%{__rm} -f %{buildroot}%{_bindir}/bpython-gtk

#desktop-file-install --delete-original        \
#  --dir %{buildroot}%{_datadir}/applications  \
#  %{buildroot}%{_datadir}/applications/%{name}.desktop

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root, -)
%doc AUTHORS CHANGELOG doc LICENSE light.theme README sample-config sample.theme
%{_bindir}/%{name}
%{python_sitelib}/%{name}*
%{_mandir}/man1/%{name}.1*
%{_mandir}/man5/bpython-config.5*
#{_datadir}/applications/%{name}.desktop

%changelog
* Sat Apr 09 2010 Terje Rosten <terje.rosten@ntnu.no> - 0.9.6.2-2
- Fix man page (bz #561800)

* Sat Apr 09 2010 Terje Rosten <terje.rosten@ntnu.no> - 0.9.6.2-1
- 0.9.6.2

* Thu Nov 05 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.9.5.2-1
- 0.9.5.2

* Fri Jul 31 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.9.4-1
- 0.9.4
- Update urls

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

* Mon May 18 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.8.0-1
- 0.8.0

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Jan  5 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.7.1-2
- Add setuptools to buildreq

* Mon Jan  5 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.7.1-1
- 0.7.1

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.7.0-2
- Rebuild for Python 2.6

* Mon  Sep 1 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.7.0-1
- 0.7.0

* Tue Aug 12 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.6.3-1
- 0.6.3

* Mon May  5 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.3.1-2
- fix summary
- remove desktop file and optflags

* Wed Apr 30 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.3.1-1
- 0.3.1
- drop patch

* Sun Apr 27 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.2.3-1
- random fixes

* Sun Apr 27 2008 Pascal Bleser <guru@unixtech.be> 0.2.3
- new package