0bffbb0
%global        with_python3 1
25056f9
25056f9
Name:          bpython
25056f9
Summary:       Fancy curses interface to the Python interactive interpreter
74a1e4e
Version:       0.13.1
74a1e4e
Release:       1%{?dist}
bff1d72
URL:           http://www.bpython-interpreter.org/
25056f9
Group:         Development/Libraries
25056f9
License:       MIT
bff1d72
Source0:       http://www.bpython-interpreter.org/releases/bpython-%{version}.tar.gz
176d1db
# some gimp resize of http://bpython-interpreter.org/static/img/bpython-logo.png
176d1db
Source1:       bpython.png
176d1db
Patch0:        bpython-0.9.7.1-desktop.patch
25056f9
BuildArch:     noarch
ac1ea40
BuildRequires: python-devel
ac1ea40
BuildRequires: python-setuptools
0bffbb0
BuildRequires: python-sphinx
ac1ea40
BuildRequires: desktop-file-utils
870b452
%if 0%{?with_python3}
870b452
BuildRequires: python3-devel
870b452
BuildRequires: python3-setuptools
870b452
%endif # if with_python3
4dda57b
Requires:      pygtk2
4dda57b
Requires:      python-urwid
4dda57b
Requires:      python-pygments
870b452
25056f9
%description
25056f9
bpython is a fancy interface to the Python interpreter for Unix-like
25056f9
operating systems. It has the following features:
25056f9
 o in-line syntax highlighting
25056f9
 o readline-like autocomplete with suggestions displayed as you type
25056f9
 o expected parameter list for any Python function.
25056f9
 o eewind function to pop the last line of code from memory and
25056f9
   re-evaluate.
25056f9
 o send the code you've entered off to a pastebin and display the
25056f9
   pastebin URL for copying, etc.  
25056f9
 o save the code you've entered to a file
25056f9
 o auto indentation
25056f9
870b452
%if 0%{?with_python3}
4dda57b
%package -n    python3-bpython
870b452
Summary:       Fancy curses interface to the Python 3 interactive interpreter 
870b452
Group:         Development/Languages
870b452
Requires:      python3-pygments
b520165
#Requires:      python3-urwid
870b452
870b452
%description -n python3-bpython
870b452
bpython is a fancy interface to the Python interpreter for Unix-like
870b452
operating systems. It has the following features:
870b452
 o in-line syntax highlighting
870b452
 o readline-like autocomplete with suggestions displayed as you type
870b452
 o expected parameter list for any Python function.
870b452
 o eewind function to pop the last line of code from memory and
870b452
   re-evaluate.
870b452
 o send the code you've entered off to a pastebin and display the
870b452
   pastebin URL for copying, etc.  
870b452
 o save the code you've entered to a file
870b452
 o auto indentation
870b452
870b452
This is the Python 3 build of bpython
870b452
%endif # if with_python3
870b452
25056f9
%prep
bff1d72
%setup -q
43ebbdd
%patch0 -p1
870b452
%if 0%{?with_python3}
870b452
rm -rf %{py3dir}
870b452
cp -a . %{py3dir}
870b452
# 2to3 is done for us by the setup.py
870b452
%endif # with_python3
870b452
25056f9
%build
4dda57b
%{__python2} setup.py build
25056f9
870b452
%if 0%{?with_python3}
870b452
pushd %{py3dir}
870b452
%{__python3} setup.py build
870b452
popd
870b452
%endif # with_python3
870b452
25056f9
%install
870b452
# Install python 3 first, so that python 2 gets precedence:
870b452
%if 0%{?with_python3}
870b452
pushd %{py3dir}
870b452
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
870b452
# Give python 3 executables a "python3-" prefix to avoid collisions with their
870b452
# python 2 counterparts:
870b452
mv %{buildroot}/%{_bindir}/%{name} %{buildroot}/%{_bindir}/python3-%{name}
b520165
# python3-urwid ok, however python3 twisted also needed
b520165
#mv %{buildroot}/%{_bindir}/%{name}-urwid %{buildroot}/%{_bindir}/python3-%{name}-urwid
4dda57b
rm -f %{buildroot}%{_bindir}/bpython-urwid
74a1e4e
# Not support for gtk/curtsies in Python 3 yet
4dda57b
rm -f %{buildroot}%{_datadir}/applications/%{name}.desktop
4dda57b
rm -f %{buildroot}%{_bindir}/bpython-gtk
74a1e4e
rm -f %{buildroot}%{_bindir}/bpython-curtsies
870b452
popd
870b452
%endif # with_python3
870b452
4dda57b
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
176d1db
desktop-file-install --delete-original         \
176d1db
   --dir %{buildroot}%{_datadir}/applications  \
176d1db
   %{buildroot}%{_datadir}/applications/%{name}.desktop
4dda57b
install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png
74a1e4e
# Not support for curtsies yet
74a1e4e
rm -f %{buildroot}%{_bindir}/bpython-curtsies
25056f9
25056f9
%files
0bffbb0
%doc AUTHORS CHANGELOG LICENSE ROADMAP TODO
0bffbb0
%doc light.theme sample-config sample.theme
25056f9
%{_bindir}/%{name}
176d1db
%{_bindir}/%{name}-gtk
695f06d
%{_bindir}/%{name}-urwid
25056f9
%{python_sitelib}/%{name}*
176d1db
%{python_sitelib}/bpdb
a972a90
%{_mandir}/man1/%{name}.1*
870b452
%{_mandir}/man5/%{name}-config.5*
176d1db
%{_datadir}/applications/%{name}.desktop
176d1db
%{_datadir}/pixmaps/%{name}.png
25056f9
870b452
%if 0%{?with_python3}
870b452
%files -n python3-bpython
0bffbb0
%doc AUTHORS CHANGELOG LICENSE ROADMAP TODO
0bffbb0
%doc light.theme sample-config sample.theme
870b452
%{_bindir}/python3-%{name}
b520165
#{_bindir}/python3-%{name}-urwid
870b452
%{python3_sitelib}/%{name}*
176d1db
%{python3_sitelib}/bpdb
870b452
%endif # with_python3
870b452
25056f9
%changelog
74a1e4e
* Mon Aug 11 2014 Terje Rosten <terje.rosten@ntnu.no> - 0.13.1-1
74a1e4e
- 0.13.1
74a1e4e
9806df0
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12-6
9806df0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
9806df0
195a865
* Tue May 27 2014 Kalev Lember <kalevlember@gmail.com> - 0.12-5
195a865
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
195a865
4dda57b
* Mon Nov 18 2013 Terje Rosten <terje.rosten@ntnu.no> - 0.12-4
4dda57b
- Add patch to fix resize crash (bz #667934)
4dda57b
206c347
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12-3
206c347
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
206c347
10fb45a
* Wed Mar 06 2013 Terje Rosten <terje.rosten@ntnu.no> - 0.12-2
10fb45a
- Add patch to fix import crash (bz #823662)
10fb45a
0bffbb0
* Wed Jan 30 2013 Terje Rosten <terje.rosten@ntnu.no> - 0.12-1
0bffbb0
- 0.12
0bffbb0
fa04080
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.11-4
fa04080
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
fa04080
71fff1e
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 0.11-3
71fff1e
- remove rhel logic from with_python3 conditional
71fff1e
00c3287
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-2
00c3287
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
00c3287
b520165
* Mon May 07 2012 Terje Rosten <terje.rosten@ntnu.no> - 0.11-1
b520165
- 0.11
b520165
c4acc2b
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.1-3
c4acc2b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
c4acc2b
ac1ea40
* Mon Oct 17 2011 Terje Rosten <terje.rosten@ntnu.no> - 0.10.1-2
ac1ea40
- Add python-urwid to buildreq
ac1ea40
695f06d
* Mon Oct 17 2011 Terje Rosten <terje.rosten@ntnu.no> - 0.10.1-1
695f06d
- 0.10.1
695f06d
b56f2b9
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.7.1-2
b56f2b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b56f2b9
695f06d
* Thu Sep 02 2010 Terje Rosten <terje.rosten@ntnu.no> - 0.9.7.1-1
176d1db
- 0.9.7.1
176d1db
64431f3
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.9.6.2-7
64431f3
- rebuild with python3.2
64431f3
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
64431f3
dee2034
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.6.2-6
dee2034
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
dee2034
43ebbdd
* Sun May 30 2010 Terje Rosten <terje.rosten@ntnu.no> - 0.9.6.2-5
43ebbdd
- Add patch to fix suspend
43ebbdd
870b452
* Sun May 09 2010 Terje Rosten <terje.rosten@ntnu.no> - 0.9.6.2-4
870b452
- bpython don't use pyparsing
870b452
870b452
* Fri May 07 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.6.2-3
870b452
- Add python3 subpackage (bz #590107)
870b452
74a1e4e
* Fri Apr 09 2010 Terje Rosten <terje.rosten@ntnu.no> - 0.9.6.2-2
6b855b1
- Fix man page (bz #561800)
6b855b1
74a1e4e
* Fri Apr 09 2010 Terje Rosten <terje.rosten@ntnu.no> - 0.9.6.2-1
8af6d74
- 0.9.6.2
8af6d74
0465e2e
* Thu Nov 05 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.9.5.2-1
0465e2e
- 0.9.5.2
0465e2e
bff1d72
* Fri Jul 31 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.9.4-1
bff1d72
- 0.9.4
bff1d72
- Update urls
bff1d72
098b2d7
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-2
098b2d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
098b2d7
ded77d5
* Mon May 18 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.8.0-1
ded77d5
- 0.8.0
ded77d5
335c5fe
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-3
335c5fe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
335c5fe
5025a1e
* Mon Jan  5 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.7.1-2
5025a1e
- Add setuptools to buildreq
5025a1e
2240e37
* Mon Jan  5 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.7.1-1
2240e37
- 0.7.1
2240e37
3c6a366
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.7.0-2
3c6a366
- Rebuild for Python 2.6
3c6a366
a972a90
* Mon  Sep 1 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.7.0-1
a972a90
- 0.7.0
a972a90
8750690
* Tue Aug 12 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.6.3-1
8750690
- 0.6.3
8750690
25056f9
* Mon May  5 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.3.1-2
25056f9
- fix summary
25056f9
- remove desktop file and optflags
25056f9
25056f9
* Wed Apr 30 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.3.1-1
25056f9
- 0.3.1
25056f9
- drop patch
25056f9
25056f9
* Sun Apr 27 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.2.3-1
25056f9
- random fixes
25056f9
25056f9
* Sun Apr 27 2008 Pascal Bleser <guru@unixtech.be> 0.2.3
25056f9
- new package