--- python-progressbar-2.2.orig/debian/README.source +++ python-progressbar-2.2/debian/README.source @@ -0,0 +1,4 @@ +This package uses dpatch to handle patches against upstream source code; you +can find additional information about dpatch at + + /usr/share/doc/dpatch/ --- python-progressbar-2.2.orig/debian/control +++ python-progressbar-2.2/debian/control @@ -0,0 +1,19 @@ +Source: python-progressbar +Section: python +Priority: optional +Maintainer: Debian Python Modules Team +Uploaders: Sandro Tosi +Build-Depends: debhelper (>= 5), python, dpatch +Build-Depends-Indep: python-support (>= 0.4) +Standards-Version: 3.8.0 +Homepage: http://pypi.python.org/pypi/progressbar +Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-progressbar/trunk/ +Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/python-progressbar/trunk/ + +Package: python-progressbar +Architecture: all +Depends: ${python:Depends}, ${misc:Depends} +Description: text progressbar library for Python + This library provides a text mode progressbar. This is typically used + to display the progress of a long running operation, providing a + visual clue that processing is underway. --- python-progressbar-2.2.orig/debian/copyright +++ python-progressbar-2.2/debian/copyright @@ -0,0 +1,34 @@ +This package was debianized by Sandro Tosi on +Tue, 19 Aug 2008 17:06:03 +0200 + +It was downloaded from http://pypi.python.org/pypi/progressbar + +Upstream Author: + + Nilton Volpato + +Copyright: + + Copyright (C) 2005 Nilton Volpato + +License: + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On a Debian system the complete text of the GNU Lesser General Public License +v2.1 can be found in the file `/usr/share/common-licenses/LGPL-2.1'. + +The Debian packaging is Copyright (C) 2008-2009, Sandro Tosi +and is licensed under the LGPLv2.1, see `/usr/share/common-licenses/LGPL-2.1'. --- python-progressbar-2.2.orig/debian/changelog +++ python-progressbar-2.2/debian/changelog @@ -0,0 +1,27 @@ +python-progressbar (2.2-2) unstable; urgency=low + + * debian/control + - switch Vcs-Browser field to viewsvn + - updated my email address + - removed DM-Upload-Allowed flag + * debian/README.source + - added to comply to Policy 3.8.0 (we use a patch system) + * debian/rules + - don't compress .py files (in doc dir) + - merged 'rm' call into 'dh_clean' one + - added $(CURDIR) to installation dir + * debian/copyright + - updated my email address + - fixed copyright notice and updated years for Debian packaging + + -- Sandro Tosi Fri, 30 Jan 2009 10:11:49 +0100 + +python-progressbar (2.2-1) unstable; urgency=low + + [ Sandro Tosi ] + * Initial release. (Closes: #495664) + + [ Piotr Ożarowski ] + * DM-Upload-Allowed set to "yes" + + -- Sandro Tosi Wed, 20 Aug 2008 20:55:08 +0200 --- python-progressbar-2.2.orig/debian/watch +++ python-progressbar-2.2/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://pypi.python.org/packages/source/p/progressbar/progressbar-(.*)\.tar\.gz --- python-progressbar-2.2.orig/debian/rules +++ python-progressbar-2.2/debian/rules @@ -0,0 +1,54 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/dpatch/dpatch.make + +build: build-stamp +build-stamp: patch-stamp + dh_testdir + + python setup.py build; + + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + + [ ! -d build ] || rm -rf build + + python setup.py clean; + + find . -name '*\.pyc' -delete + + dh_clean build-stamp + +install: build + dh_testdir + dh_testroot + dh_installdirs + + # Add here commands to install the package into debian/python-progressbar. + python setup.py install --root=$(CURDIR)/debian/python-progressbar + + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs README + dh_installexamples debian/examples/* + dh_pysupport + dh_compress -X.py + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- python-progressbar-2.2.orig/debian/compat +++ python-progressbar-2.2/debian/compat @@ -0,0 +1 @@ +5 --- python-progressbar-2.2.orig/debian/examples/examples.py +++ python-progressbar-2.2/debian/examples/examples.py @@ -0,0 +1,81 @@ +#!/usr/bin/python +# +# progressbar - Text progressbar library for python. +# Copyright (c) 2005 Nilton Volpato +# +# Extracted from progressbar.py source code +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +from progressbar import * + +if __name__=='__main__': + import os + + def example1(): + widgets = ['Test: ', Percentage(), ' ', Bar(marker=RotatingMarker()), + ' ', ETA(), ' ', FileTransferSpeed()] + pbar = ProgressBar(widgets=widgets, maxval=10000000).start() + for i in range(1000000): + # do something + pbar.update(10*i+1) + pbar.finish() + print + + def example2(): + class CrazyFileTransferSpeed(FileTransferSpeed): + "It's bigger between 45 and 80 percent" + def update(self, pbar): + if 45 < pbar.percentage() < 80: + return 'Bigger Now ' + FileTransferSpeed.update(self,pbar) + else: + return FileTransferSpeed.update(self,pbar) + + widgets = [CrazyFileTransferSpeed(),' <<<', Bar(), '>>> ', Percentage(),' ', ETA()] + pbar = ProgressBar(widgets=widgets, maxval=10000000) + # maybe do something + pbar.start() + for i in range(2000000): + # do something + pbar.update(5*i+1) + pbar.finish() + print + + def example3(): + widgets = [Bar('>'), ' ', ETA(), ' ', ReverseBar('<')] + pbar = ProgressBar(widgets=widgets, maxval=10000000).start() + for i in range(1000000): + # do something + pbar.update(10*i+1) + pbar.finish() + print + + def example4(): + widgets = ['Test: ', Percentage(), ' ', + Bar(marker='0',left='[',right=']'), + ' ', ETA(), ' ', FileTransferSpeed()] + pbar = ProgressBar(widgets=widgets, maxval=500) + pbar.start() + for i in range(100,500+1,50): + time.sleep(0.2) + pbar.update(i) + pbar.finish() + print + + + example1() + example2() + example3() + example4() --- python-progressbar-2.2.orig/debian/patches/00list +++ python-progressbar-2.2/debian/patches/00list @@ -0,0 +1 @@ +10_add_simpleprogress --- python-progressbar-2.2.orig/debian/patches/10_add_simpleprogress.dpatch +++ python-progressbar-2.2/debian/patches/10_add_simpleprogress.dpatch @@ -0,0 +1,22 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10_add_simpleprogress.dpatch by Sandro Tosi +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Add a simple progress notice + +@DPATCH@ +diff -urNad python-progressbar~/progressbar.py python-progressbar/progressbar.py +--- python-progressbar~/progressbar.py 2006-05-07 07:34:50.000000000 +0200 ++++ python-progressbar/progressbar.py 2008-08-19 23:50:07.672242043 +0200 +@@ -148,6 +148,11 @@ + def update(self, pbar): + return '%3d%%' % pbar.percentage() + ++class SimpleProgress(ProgressBarWidget): ++ "Simple Progress: returns what is already done and the total, e.g. '5 of 47'" ++ def update(self, pbar): ++ return '%d of %d' % (pbar.currval, pbar.maxval) ++ + class Bar(ProgressBarWidgetHFill): + "The bar of progress. It will strech to fill the line." + def __init__(self, marker='#', left='|', right='|'):