Date: Sunday, October 9, 2016 @ 14:54:15 Author: seblu Revision: 191708
archrelease: copy trunk to community-any Added: python-progressbar/repos/community-any/01-python33.patch (from rev 191707, python-progressbar/trunk/01-python33.patch) python-progressbar/repos/community-any/PKGBUILD (from rev 191707, python-progressbar/trunk/PKGBUILD) Deleted: python-progressbar/repos/community-any/01-python33.patch python-progressbar/repos/community-any/PKGBUILD -------------------+ 01-python33.patch | 186 ++++++++++++++++++++++++++-------------------------- PKGBUILD | 103 ++++++++++++++++------------ 2 files changed, 152 insertions(+), 137 deletions(-) Deleted: 01-python33.patch =================================================================== --- 01-python33.patch 2016-10-09 14:53:36 UTC (rev 191707) +++ 01-python33.patch 2016-10-09 14:54:15 UTC (rev 191708) @@ -1,93 +0,0 @@ -# HG changeset patch -# User Nilton Volpato <nil...@google.com> -# Date 1348267873 10800 -# Node ID 3c94a3a1ebe1325c7c605cc8f11126dcc632b04d -# Parent 83ece680e4fe06aa704de4c3a967355db21046d4 -Remove format as a slot attribute, as that is not compatible with python 3.3 - -diff -r 83ece680e4fe -r 3c94a3a1ebe1 progressbar/widgets.py ---- a/progressbar/widgets.py Tue Sep 04 18:42:57 2012 -0700 -+++ b/progressbar/widgets.py Fri Sep 21 19:51:13 2012 -0300 -@@ -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): Copied: python-progressbar/repos/community-any/01-python33.patch (from rev 191707, python-progressbar/trunk/01-python33.patch) =================================================================== --- 01-python33.patch (rev 0) +++ 01-python33.patch 2016-10-09 14:54:15 UTC (rev 191708) @@ -0,0 +1,93 @@ +# HG changeset patch +# User Nilton Volpato <nil...@google.com> +# Date 1348267873 10800 +# Node ID 3c94a3a1ebe1325c7c605cc8f11126dcc632b04d +# Parent 83ece680e4fe06aa704de4c3a967355db21046d4 +Remove format as a slot attribute, as that is not compatible with python 3.3 + +diff -r 83ece680e4fe -r 3c94a3a1ebe1 progressbar/widgets.py +--- a/progressbar/widgets.py Tue Sep 04 18:42:57 2012 -0700 ++++ b/progressbar/widgets.py Fri Sep 21 19:51:13 2012 -0300 +@@ -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): Deleted: PKGBUILD =================================================================== --- PKGBUILD 2016-10-09 14:53:36 UTC (rev 191707) +++ PKGBUILD 2016-10-09 14:54:15 UTC (rev 191708) @@ -1,44 +0,0 @@ -# $Id$ -# Maintainer: Sébastien Luttringer - -pkgbase=python-progressbar -pkgname=('python-progressbar' 'python2-progressbar') -pkgver=2.3 -pkgrel=6 -arch=('any') -url='http://code.google.com/p/python-progressbar/' -license=('LGPL') -makedepends=('python' 'python-setuptools' 'python2' 'python2-setuptools') -source=("http://python-progressbar.googlecode.com/files/progressbar-$pkgver.tar.gz" - '01-python33.patch') -sha1sums=('aebb94b452990468c77090fb43b335cf0a724353' - '5dc63611e364e90441cbc90fe2530b9fab67e780') - -build() { - cd progressbar-$pkgver - patch -p 1 -i "$srcdir"/01-python33.patch - python setup.py build --build-lib=build/python - python2 setup.py build --build-lib=build/python2 - find build/python2 -type f -exec \ - sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \; -} - -package_python-progressbar() { - pkgdesc='Text progressbar library for python' - depends=('python') - - cd progressbar-$pkgver - python setup.py build --build-lib=build/python \ - install --root="$pkgdir" --optimize=1 -} - -package_python2-progressbar() { - pkgdesc='Text progressbar library for python2' - depends=('python2') - - cd progressbar-$pkgver - python2 setup.py build --build-lib=build/python2 \ - install --root="$pkgdir" --optimize=1 -} - -# vim:set ts=2 sw=2 et: Copied: python-progressbar/repos/community-any/PKGBUILD (from rev 191707, python-progressbar/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2016-10-09 14:54:15 UTC (rev 191708) @@ -0,0 +1,59 @@ +# $Id$ +# Maintainer: Sébastien Luttringer + +pkgbase=python-progressbar +pkgname=('python-progressbar' 'python2-progressbar') +pkgver=2.3 +pkgrel=7 +arch=('any') +url='https://pypi.python.org/pypi/progressbar' +license=('LGPL') +makedepends=('python' 'python-setuptools' 'python2' 'python2-setuptools') +source=("https://pypi.io/packages/source/p/progressbar/progressbar-$pkgver.tar.gz" + '01-python33.patch') +sha1sums=('5b4b11fc0421855314d666b08c069d2ed0349bcc' + '5dc63611e364e90441cbc90fe2530b9fab67e780') + +prepare() { + cd progressbar-$pkgver + # apply patch from the source array (should be a pacman feature) + local filename + for filename in "${source[@]}"; do + if [[ "$filename" =~ \.patch$ ]]; then + msg2 "Applying patch $filename" + patch -p1 -N -i "$srcdir/$filename" + fi + done + # fix egg-info permissions + chmod -R ug=rwX,o=rX . +} + +build() { + cd progressbar-$pkgver + python setup.py build --build-lib=build/python + python2 setup.py build --build-lib=build/python2 + + msg2 'Fix python2 sheebang' + find build/python2 -type f -exec \ + sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \; +} + +package_python-progressbar() { + pkgdesc='Text progressbar library for python' + depends=('python') + + cd progressbar-$pkgver + python setup.py build --build-lib=build/python \ + install --root="$pkgdir" --optimize=1 +} + +package_python2-progressbar() { + pkgdesc='Text progressbar library for python2' + depends=('python2') + + cd progressbar-$pkgver + python2 setup.py build --build-lib=build/python2 \ + install --root="$pkgdir" --optimize=1 +} + +# vim:set ts=2 sw=2 et: