diff options
-rw-r--r-- | dev-python/progressbar/ChangeLog | 6 | ||||
-rw-r--r-- | dev-python/progressbar/files/progressbar-2.3-python3.3.patch | 94 | ||||
-rw-r--r-- | dev-python/progressbar/progressbar-2.3-r1.ebuild | 6 |
3 files changed, 103 insertions, 3 deletions
diff --git a/dev-python/progressbar/ChangeLog b/dev-python/progressbar/ChangeLog index c1826db2c99f..26e1a4d1474c 100644 --- a/dev-python/progressbar/ChangeLog +++ b/dev-python/progressbar/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-python/progressbar # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/progressbar/ChangeLog,v 1.12 2013/09/05 18:46:37 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/progressbar/ChangeLog,v 1.13 2013/10/13 15:19:39 floppym Exp $ + + 13 Oct 2013; Mike Gilbert <floppym@gentoo.org> + +files/progressbar-2.3-python3.3.patch, progressbar-2.3-r1.ebuild: + Fix build with python3.3, bug 438666. 05 Sep 2013; Michał Górny <mgorny@gentoo.org> progressbar-2.3-r1.ebuild: Clean up PYTHON_COMPAT from old implementations. diff --git a/dev-python/progressbar/files/progressbar-2.3-python3.3.patch b/dev-python/progressbar/files/progressbar-2.3-python3.3.patch new file mode 100644 index 000000000000..112bcf4b3779 --- /dev/null +++ b/dev-python/progressbar/files/progressbar-2.3-python3.3.patch @@ -0,0 +1,94 @@ +# HG changeset patch +# User Nilton Volpato <nilton@google.com> +# Date 1348267873 10800 +# Fri Sep 21 19:51:13 2012 -0300 +# Node ID 3c94a3a1ebe1325c7c605cc8f11126dcc632b04d +# Parent 83ece680e4fe06aa704de4c3a967355db21046d4 +Remove format as a slot attribute, as that is not compatible with python 3.3 + +diff --git a/progressbar/widgets.py b/progressbar/widgets.py +--- a/progressbar/widgets.py ++++ b/progressbar/widgets.py +@@ -81,11 +81,11 @@ + class Timer(Widget): + """Widget which displays the elapsed seconds.""" + +- __slots__ = ('format',) ++ __slots__ = ('format_string',) + TIME_SENSITIVE = True + + def __init__(self, format='Elapsed Time: %s'): +- self.format = format ++ self.format_string = format + + @staticmethod + def format_time(seconds): +@@ -97,7 +97,7 @@ + def update(self, pbar): + """Updates the widget to show the elapsed time.""" + +- return self.format % self.format_time(pbar.seconds_elapsed) ++ return self.format_string % self.format_time(pbar.seconds_elapsed) + + + class ETA(Timer): +@@ -121,9 +121,9 @@ + class FileTransferSpeed(Widget): + """Widget for showing the transfer speed (useful for file transfers).""" + +- format = '%6.2f %s%s/s' +- prefixes = ' kMGTPEZY' +- __slots__ = ('unit', 'format') ++ FORMAT = '%6.2f %s%s/s' ++ PREFIXES = ' kMGTPEZY' ++ __slots__ = ('unit',) + + def __init__(self, unit='B'): + self.unit = unit +@@ -138,7 +138,7 @@ + power = int(math.log(speed, 1000)) + scaled = speed / 1000.**power + +- return self.format % (scaled, self.prefixes[power], self.unit) ++ return self.FORMAT % (scaled, self.PREFIXES[power], self.unit) + + + class AnimatedMarker(Widget): +@@ -168,13 +168,13 @@ + class Counter(Widget): + """Displays the current count.""" + +- __slots__ = ('format',) ++ __slots__ = ('format_string',) + + def __init__(self, format='%d'): +- self.format = format ++ self.format_string = format + + def update(self, pbar): +- return self.format % pbar.currval ++ return self.format_string % pbar.currval + + + class Percentage(Widget): +@@ -197,9 +197,9 @@ + 'value': ('currval', None) + } + +- __slots__ = ('format',) ++ __slots__ = ('format_string',) + def __init__(self, format): +- self.format = format ++ self.format_string = format + + def update(self, pbar): + context = {} +@@ -213,7 +213,7 @@ + context[name] = transform(value) + except: pass + +- return self.format % context ++ return self.format_string % context + + + class SimpleProgress(Widget): diff --git a/dev-python/progressbar/progressbar-2.3-r1.ebuild b/dev-python/progressbar/progressbar-2.3-r1.ebuild index ebbcf2a1e414..2554eb529f71 100644 --- a/dev-python/progressbar/progressbar-2.3-r1.ebuild +++ b/dev-python/progressbar/progressbar-2.3-r1.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/progressbar/progressbar-2.3-r1.ebuild,v 1.4 2013/09/05 18:46:37 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/progressbar/progressbar-2.3-r1.ebuild,v 1.5 2013/10/13 15:19:39 floppym Exp $ EAPI=5 -PYTHON_COMPAT=( python{2_6,2_7,3_2} pypy2_0 ) +PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} pypy2_0 ) inherit distutils-r1 @@ -18,3 +18,5 @@ IUSE="" DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" RDEPEND="" + +PATCHES=( "${FILESDIR}/progressbar-2.3-python3.3.patch" ) |