[bpython/el6] new version of python, using epel6 sphinx10
Adam Miller
maxamillion at fedoraproject.org
Mon Jul 14 05:41:53 UTC 2014
commit 8773bf404160a47017a8117445ab1667c3bcfcd8
Author: Adam Miller <admiller at redhat.com>
Date: Mon Jul 14 00:41:19 2014 -0500
new version of python, using epel6 sphinx10
.gitignore | 1 +
bpython-0.12-imp.patch | 23 ++++++++
bpython-0.12-resize.patch | 14 +++++
bpython-epel-sphinx10.patch | 11 ++++
bpython.png | Bin 0 -> 5495 bytes
bpython.spec | 124 ++++++++++++++++++++++++++++++++-----------
sources | 3 +-
7 files changed, 142 insertions(+), 34 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 43342e1..f93f8ba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
bpython-0.9.6.2.tar.gz
/bpython-0.9.7.1.tar.gz
/bpython.png
+/bpython-0.12.tar.gz
diff --git a/bpython-0.12-imp.patch b/bpython-0.12-imp.patch
new file mode 100644
index 0000000..f0ec86a
--- /dev/null
+++ b/bpython-0.12-imp.patch
@@ -0,0 +1,23 @@
+#
+# https://bitbucket.org/bobf/bpython/commits/c921fc4081bab577ea9cb8591da2a122bbda9464/raw/
+#
+# HG changeset patch
+# User Andreas Stuehrk <andreas at bpython-interpreter.org>
+# Date 1362260102 -3600
+# Branch 0.12-bugfix
+# Node ID c921fc4081bab577ea9cb8591da2a122bbda9464
+# Parent 1fe02b22a071ebcaebeea1b54bec9b749a4bef2a
+Ignore IOError raised by ``imp.find_module``. Fixes #237.
+
+diff -r 1fe02b22a071ebcaebeea1b54bec9b749a4bef2a -r c921fc4081bab577ea9cb8591da2a122bbda9464 bpython/importcompletion.py
+--- a/bpython/importcompletion.py Sun Jan 27 16:15:02 2013 +0100
++++ b/bpython/importcompletion.py Sat Mar 02 22:35:02 2013 +0100
+@@ -134,7 +134,7 @@
+ with catch_warnings():
+ warnings.simplefilter("ignore", ImportWarning)
+ fo, pathname, _ = imp.find_module(name, [path])
+- except (ImportError, SyntaxError):
++ except (ImportError, IOError, SyntaxError):
+ continue
+ except UnicodeEncodeError:
+ # Happens with Python 3 when there is a filename in some
diff --git a/bpython-0.12-resize.patch b/bpython-0.12-resize.patch
new file mode 100644
index 0000000..6d6a95f
--- /dev/null
+++ b/bpython-0.12-resize.patch
@@ -0,0 +1,14 @@
+--- bpython/cli.py~ 2012-12-10 16:26:07.000000000 +0100
++++ bpython/cli.py 2013-11-18 22:58:45.922942612 +0100
+@@ -1773,7 +1773,10 @@
+ curses.doupdate()
+ DO_RESIZE = False
+
+- caller.resize()
++ try:
++ caller.resize()
++ except curses.error:
++ pass
+ # The list win resizes itself every time it appears so no need to do it here.
+
+
diff --git a/bpython-epel-sphinx10.patch b/bpython-epel-sphinx10.patch
new file mode 100644
index 0000000..3479038
--- /dev/null
+++ b/bpython-epel-sphinx10.patch
@@ -0,0 +1,11 @@
+--- setup.py 2012-12-10 09:26:07.000000000 -0600
++++ setup.py.sphinx10 2014-07-12 16:35:25.785888069 -0500
+@@ -31,6 +31,8 @@
+ using_translations = False
+
+ try:
++ import sys
++ sys.path.insert(0, '/usr/lib/python2.6/site-packages/Sphinx-1.0.8-py2.6.egg/')
+ from sphinx.setup_command import BuildDoc
+ using_sphinx = True
+ except ImportError:
diff --git a/bpython.png b/bpython.png
new file mode 100644
index 0000000..302a98d
Binary files /dev/null and b/bpython.png differ
diff --git a/bpython.spec b/bpython.spec
index 57e8a95..d99d01d 100644
--- a/bpython.spec
+++ b/bpython.spec
@@ -1,13 +1,15 @@
-%if 0%{?fedora} > 12 || 0%{?rhel} > 6
-%global with_python3 1
-%else
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
+%global with_python3 0
+
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
Name: bpython
Summary: Fancy curses interface to the Python interactive interpreter
-Version: 0.9.7.1
-Release: 3%{?dist}
+Version: 0.12
+Release: 6.1%{?dist}
URL: http://www.bpython-interpreter.org/
Group: Development/Libraries
License: MIT
@@ -15,15 +17,29 @@ Source0: http://www.bpython-interpreter.org/releases/bpython-%{version}.ta
# some gimp resize of http://bpython-interpreter.org/static/img/bpython-logo.png
Source1: bpython.png
Patch0: bpython-0.9.7.1-desktop.patch
+Patch1: bpython-0.12-imp.patch
+Patch2: bpython-0.12-resize.patch
+%if 0%{?rhel} && 0%{?rhel} <= 6
+Patch600: bpython-epel-sphinx10.patch
+%endif # 0%{?rhel} && 0%{?rhel} <= 6
BuildArch: noarch
-BuildRequires: python-devel python-setuptools desktop-file-utils
-Requires: python-pygments pygtk2
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: python-devel
+BuildRequires: python-setuptools
+%if 0%{?rhel} && 0%{?rhel} <= 6
+BuildRequires: python-sphinx10
+%else
+BuildRequires: python-sphinx
+%endif # 0%{?rhel} && 0%{?rhel} <= 6
+BuildRequires: desktop-file-utils
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
+BuildRequires: python3-sphinx
%endif # if with_python3
+Requires: pygtk2
+Requires: python-urwid
+Requires: python-pygments
%description
bpython is a fancy interface to the Python interpreter for Unix-like
@@ -39,10 +55,11 @@ operating systems. It has the following features:
o auto indentation
%if 0%{?with_python3}
-%package -n python3-bpython
+%package -n python3-bpython
Summary: Fancy curses interface to the Python 3 interactive interpreter
Group: Development/Languages
Requires: python3-pygments
+#Requires: python3-urwid
%description -n python3-bpython
bpython is a fancy interface to the Python interpreter for Unix-like
@@ -63,9 +80,13 @@ This is the Python 3 build of bpython
%prep
%setup -q
%patch0 -p1
-%{__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
+%patch1 -p1
+%patch2 -p1 -p0
+
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%patch600 -p0
+%endif # 0%{?rhel} && 0%{?rhel} <= 6
+
%if 0%{?with_python3}
rm -rf %{py3dir}
@@ -74,7 +95,7 @@ cp -a . %{py3dir}
%endif # with_python3
%build
-%{__python} setup.py build
+%{__python2} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
@@ -83,8 +104,6 @@ popd
%endif # with_python3
%install
-%{__rm} -rf %{buildroot}
-
# Install python 3 first, so that python 2 gets precedence:
%if 0%{?with_python3}
pushd %{py3dir}
@@ -92,26 +111,27 @@ pushd %{py3dir}
# Give python 3 executables a "python3-" prefix to avoid collisions with their
# python 2 counterparts:
mv %{buildroot}/%{_bindir}/%{name} %{buildroot}/%{_bindir}/python3-%{name}
-%{__rm} -f %{buildroot}%{_datadir}/applications/%{name}.desktop
-%{__rm} -f %{buildroot}%{_bindir}/bpython-gtk
+# python3-urwid ok, however python3 twisted also needed
+#mv %{buildroot}/%{_bindir}/%{name}-urwid %{buildroot}/%{_bindir}/python3-%{name}-urwid
+rm -f %{buildroot}%{_bindir}/bpython-urwid
+# Not support for gtk in Python 3 yet
+rm -f %{buildroot}%{_datadir}/applications/%{name}.desktop
+rm -f %{buildroot}%{_bindir}/bpython-gtk
popd
%endif # with_python3
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
desktop-file-install --delete-original \
--dir %{buildroot}%{_datadir}/applications \
%{buildroot}%{_datadir}/applications/%{name}.desktop
-%{__install} -D -p -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png
-
-%clean
-%{__rm} -rf %{buildroot}
+install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png
%files
-%defattr(-, root, root, -)
-%doc AUTHORS CHANGELOG LICENSE README ROADMAP TODO
-%doc light.theme sample-config sample.theme doc
+%doc AUTHORS CHANGELOG LICENSE ROADMAP TODO
+%doc light.theme sample-config sample.theme
%{_bindir}/%{name}
%{_bindir}/%{name}-gtk
+%{_bindir}/%{name}-urwid
%{python_sitelib}/%{name}*
%{python_sitelib}/bpdb
%{_mandir}/man1/%{name}.1*
@@ -121,22 +141,62 @@ desktop-file-install --delete-original \
%if 0%{?with_python3}
%files -n python3-bpython
-%defattr(-, root, root, -)
-%doc AUTHORS CHANGELOG LICENSE README ROADMAP TODO
-%doc light.theme sample-config sample.theme doc
+%doc AUTHORS CHANGELOG LICENSE ROADMAP TODO
+%doc light.theme sample-config sample.theme
%{_bindir}/python3-%{name}
+#{_bindir}/python3-%{name}-urwid
%{python3_sitelib}/%{name}*
%{python3_sitelib}/bpdb
%endif # with_python3
%changelog
-* Thu Sep 1 2011 Matt Domsch <mdomsch at fedoraproject.org> - 0.9.7.1-3
-- rebuild for el6
+* Fri Jul 11 2014 Adam Miller <maxamillion at fedoraproject.org> - 0.12-6.1
+- Add macros and set with_python3 to 0 for EPEL
+- conditionally patch setup.py for epel6 python-sphinx10
+
+* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.12-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Tue May 27 2014 Kalev Lember <kalevlember at gmail.com> - 0.12-5
+- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
+
+* Mon Nov 18 2013 Terje Rosten <terje.rosten at ntnu.no> - 0.12-4
+- Add patch to fix resize crash (bz #667934)
+
+* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.12-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Wed Mar 06 2013 Terje Rosten <terje.rosten at ntnu.no> - 0.12-2
+- Add patch to fix import crash (bz #823662)
+
+* Wed Jan 30 2013 Terje Rosten <terje.rosten at ntnu.no> - 0.12-1
+- 0.12
+
+* Sat Aug 04 2012 David Malcolm <dmalcolm at redhat.com> - 0.11-4
+- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
+
+* Fri Aug 3 2012 David Malcolm <dmalcolm at redhat.com> - 0.11-3
+- remove rhel logic from with_python3 conditional
+
+* Wed Jul 18 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.11-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Mon May 07 2012 Terje Rosten <terje.rosten at ntnu.no> - 0.11-1
+- 0.11
+
+* Thu Jan 12 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.10.1-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Mon Oct 17 2011 Terje Rosten <terje.rosten at ntnu.no> - 0.10.1-2
+- Add python-urwid to buildreq
+
+* Mon Oct 17 2011 Terje Rosten <terje.rosten at ntnu.no> - 0.10.1-1
+- 0.10.1
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
-* Thu Sep 2 2010 Terje Rosten <terje.rosten at ntnu.no> - 0.9.7.1-1
+* Thu Sep 02 2010 Terje Rosten <terje.rosten at ntnu.no> - 0.9.7.1-1
- 0.9.7.1
* Wed Aug 25 2010 Thomas Spura <tomspur at fedoraproject.org> - 0.9.6.2-7
diff --git a/sources b/sources
index 328de7c..4f052e2 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-f32ce6aa8ae6af8d2cf65e13f58859d4 bpython-0.9.7.1.tar.gz
-104e5f804b904afecbe85c3c05462fc0 bpython.png
+14cbe92620d386a769b3faa282a1d6c3 bpython-0.12.tar.gz
More information about the scm-commits
mailing list