[Python-modules-commits] r17246 - in packages/pyfiglet/trunk/debian (15 files)
stefanor at users.alioth.debian.org
stefanor at users.alioth.debian.org
Mon May 30 21:15:49 UTC 2011
Date: Monday, May 30, 2011 @ 21:15:48
Author: stefanor
Revision: 17246
* New upstream release.
- Update copyright.
* Upstream moved to github, updated watch file and get-orig-source.
* Dropped patches superseded upstream:
py26deprecation.diff, dir-error-path.diff, tlf-support.diff
* font-location.diff: Look in /usr/share/figlet for fonts, rather than using
pkg_resources.
* Updated debian-defaults.diff.
* Install wrapper with dh_install, as upstream has a setup.py.
* Build-Depend on python-setuptools and clean up egg-info.
Added:
packages/pyfiglet/trunk/debian/clean
packages/pyfiglet/trunk/debian/install
packages/pyfiglet/trunk/debian/patches/font-location.diff
packages/pyfiglet/trunk/debian/pyfiglet
Modified:
packages/pyfiglet/trunk/debian/changelog
packages/pyfiglet/trunk/debian/control
packages/pyfiglet/trunk/debian/copyright
packages/pyfiglet/trunk/debian/patches/debian-defaults.diff
packages/pyfiglet/trunk/debian/patches/series
packages/pyfiglet/trunk/debian/rules
packages/pyfiglet/trunk/debian/watch
Deleted:
packages/pyfiglet/trunk/debian/patches/dir-error-path.diff
packages/pyfiglet/trunk/debian/patches/py26deprecation.diff
packages/pyfiglet/trunk/debian/patches/setup.py.diff
packages/pyfiglet/trunk/debian/patches/tlf-support.diff
Modified: packages/pyfiglet/trunk/debian/changelog
===================================================================
--- packages/pyfiglet/trunk/debian/changelog 2011-05-30 18:45:25 UTC (rev 17245)
+++ packages/pyfiglet/trunk/debian/changelog 2011-05-30 21:15:48 UTC (rev 17246)
@@ -1,3 +1,18 @@
+pyfiglet (0.6+dfsg-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+ - Update copyright.
+ * Upstream moved to github, updated watch file and get-orig-source.
+ * Dropped patches superseded upstream:
+ py26deprecation.diff, dir-error-path.diff, tlf-support.diff
+ * font-location.diff: Look in /usr/share/figlet for fonts, rather than using
+ pkg_resources.
+ * Updated debian-defaults.diff.
+ * Install wrapper with dh_install, as upstream has a setup.py.
+ * Build-Depend on python-setuptools and clean up egg-info.
+
+ -- Stefano Rivera <stefanor at debian.org> Mon, 30 May 2011 21:05:33 +0200
+
pyfiglet (0.4+dfsg-3) unstable; urgency=low
* debian/copyright:
Added: packages/pyfiglet/trunk/debian/clean
===================================================================
--- packages/pyfiglet/trunk/debian/clean (rev 0)
+++ packages/pyfiglet/trunk/debian/clean 2011-05-30 21:15:48 UTC (rev 17246)
@@ -0,0 +1 @@
+*.egg-info/*
Modified: packages/pyfiglet/trunk/debian/control
===================================================================
--- packages/pyfiglet/trunk/debian/control 2011-05-30 18:45:25 UTC (rev 17245)
+++ packages/pyfiglet/trunk/debian/control 2011-05-30 21:15:48 UTC (rev 17246)
@@ -3,7 +3,10 @@
Priority: optional
Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
Uploaders: Stefano Rivera <stefanor at debian.org>
-Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.5-13~)
+Build-Depends:
+ debhelper (>= 7.0.50~),
+ python-all (>= 2.6.5-13~),
+ python-setuptools
X-Python-Version: >= 2.5
Standards-Version: 3.9.2
Homepage: http://sourceforge.net/projects/pyfiglet/
Modified: packages/pyfiglet/trunk/debian/copyright
===================================================================
--- packages/pyfiglet/trunk/debian/copyright 2011-05-30 18:45:25 UTC (rev 17245)
+++ packages/pyfiglet/trunk/debian/copyright 2011-05-30 21:15:48 UTC (rev 17246)
@@ -1,11 +1,11 @@
Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174
Upstream-Name: pyfiglet
-Upstream-Contact: Christopher Jones <cjones at gmail.com>
-Source: http://sourceforge.net/projects/pyfiglet/
-Conmment:
+Upstream-Contact: Peter Waller <peter.waller at gmail.com>
+Source: https://github.com/pwaller/pyfiglet
+Comment:
The upstream for this package includes non-distributable items is the release
tarball:
- * fonts.zip - a collection of figlet fonts from ftp.figlet.org
+ * pyfiglet/fonts - a collection of figlet fonts from ftp.figlet.org
* figfont.txt - the Figlet specification
Both clearly non-distributable, as described here http://bugs.debian.org/274950
.
@@ -15,7 +15,9 @@
Upstream bug: https://sourceforge.net/tracker/?func=detail&aid=2933719&group_id=200820&atid=975074
Files: *
-Copyright: 2007, Christopher Jones <cjones at gmail.com>
+Copyright: 2007, Christopher Jones <cjones at gmail.com>,
+ 2011, Peter Waller <peter.waller at gmail.com>,
+ 2011, Stefano Rivera <stefanor at debian.org>
License: GPL-2+
Files: debian/*
Added: packages/pyfiglet/trunk/debian/install
===================================================================
--- packages/pyfiglet/trunk/debian/install (rev 0)
+++ packages/pyfiglet/trunk/debian/install 2011-05-30 21:15:48 UTC (rev 17246)
@@ -0,0 +1 @@
+debian/pyfiglet /usr/bin
Modified: packages/pyfiglet/trunk/debian/patches/debian-defaults.diff
===================================================================
--- packages/pyfiglet/trunk/debian/patches/debian-defaults.diff 2011-05-30 18:45:25 UTC (rev 17245)
+++ packages/pyfiglet/trunk/debian/patches/debian-defaults.diff 2011-05-30 21:15:48 UTC (rev 17246)
@@ -1,49 +1,17 @@
Description: Debian figlet defaults.
- Change defaults to be toilet-compatible (font: future), and set the fontdir to
- the location of figlet fonts in debian: /usr/share/figlet
+ Change defaults to be toilet-compatible (font: future)
Author: Stefano Rivera <stefanor at debian.org>
-Forwarded: https://github.com/pwaller/pyfiglet/pull/2
-Last-Update: 2010-02-05
+Forwarded: not-needed
+Last-Update: 2011-05-29
---- a/pyfiglet.py
-+++ b/pyfiglet.py
-@@ -53,7 +53,7 @@
- meta-data about how it should be displayed by default
+--- a/pyfiglet/__init__.py
++++ b/pyfiglet/__init__.py
+@@ -32,7 +32,7 @@
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
"""
- class FigletFont(object):
-- def __init__(self, dir='.', font='standard'):
-+ def __init__(self, dir='.', font='future'):
- self.dir = dir
- self.font = font
-@@ -224,7 +224,7 @@
- Use this Font class if it exists inside of a zipfile.
- """
- class ZippedFigletFont(FigletFont):
-- def __init__(self, dir='.', font='standard', zipfile='fonts.zip'):
-+ def __init__(self, dir='.', font='future', zipfile='fonts.zip'):
- self.zipfile = zipfile
- FigletFont.__init__(self, dir=dir, font=font)
+-DEFAULT_FONT='standard'
++DEFAULT_FONT='future'
-@@ -462,7 +462,7 @@
- Main figlet class.
- """
- class Figlet(object):
-- def __init__(self, dir=None, zipfile=None, font='standard', direction='auto', justify='auto', width=80):
-+ def __init__(self, dir=None, zipfile=None, font='future', direction='auto', justify='auto', width=80):
- self.dir = dir
- self.font = font
- self._direction = direction
-@@ -540,10 +540,10 @@
- parser = OptionParser(version=__version__, usage='%prog [options] text..')
-
-- parser.add_option( '-f', '--font', default='standard',
-+ parser.add_option( '-f', '--font', default='future',
- help='font to render with (default: %default)', metavar='FONT' )
-
-- parser.add_option( '-d', '--fontdir', default=None,
-+ parser.add_option( '-d', '--fontdir', default='/usr/share/figlet',
- help='location of font files', metavar='DIR' )
-
- parser.add_option( '-z', '--zipfile', default=dir+'/fonts.zip',
+ def figlet_format(text, font=DEFAULT_FONT, **kwargs):
Deleted: packages/pyfiglet/trunk/debian/patches/dir-error-path.diff
===================================================================
--- packages/pyfiglet/trunk/debian/patches/dir-error-path.diff 2011-05-30 18:45:25 UTC (rev 17245)
+++ packages/pyfiglet/trunk/debian/patches/dir-error-path.diff 2011-05-30 21:15:48 UTC (rev 17246)
@@ -1,25 +0,0 @@
-Description: Bugfix for error-handling code.
- The directory-tree handling code is poorer quality than the Zip file code.
- This corrects some non-existant variable accessing.
-Author: Stefano Rivera <stefanor at debian.org>
-Forwarded: https://github.com/pwaller/pyfiglet/pull/1
-Last Update: 2011-02-05
-
---- a/pyfiglet.py
-+++ b/pyfiglet.py
-@@ -104,13 +104,13 @@
-
- header = data.pop(0)
- if self.reMagicNumber.search(header) is None:
-- raise FontError, '%s is not a valid figlet font' % fontPath
-+ raise FontError, '%s is not a valid figlet font' % self.font
-
- header = self.reMagicNumber.sub('', header)
- header = header.split()
-
- if len(header) < 6:
-- raise FontError, 'malformed header for %s' % fontPath
-+ raise FontError, 'malformed header for %s' % self.font
-
- hardBlank = header[0]
- height, baseLine, maxLength, oldLayout, commentLines = map(int, header[1:6])
Added: packages/pyfiglet/trunk/debian/patches/font-location.diff
===================================================================
--- packages/pyfiglet/trunk/debian/patches/font-location.diff (rev 0)
+++ packages/pyfiglet/trunk/debian/patches/font-location.diff 2011-05-30 21:15:48 UTC (rev 17246)
@@ -0,0 +1,53 @@
+Description: Use Debian's figlet fonts.
+ Look in /usr/share/figlet rather than using pkg_resources to find fonts.
+Author: Stefano Rivera <stefanor at debian.org>
+Forwarded: not-needed
+Last-Update: 2011-05-29
+
+--- a/pyfiglet/__init__.py
++++ b/pyfiglet/__init__.py
+@@ -5,7 +5,7 @@
+ """
+
+ import os
+-import pkg_resources
++import os.path
+ import re
+ import sys
+ from optparse import OptionParser
+@@ -82,8 +82,8 @@
+
+ for extension in ('tlf', 'flf'):
+ fn = '%s.%s' % (font, extension)
+- if pkg_resources.resource_exists('pyfiglet.fonts', fn):
+- self.data = pkg_resources.resource_string('pyfiglet.fonts', fn)
++ if os.path.isfile(os.path.join('/usr/share/figlet', fn)):
++ self.data = open(os.path.join('/usr/share/figlet', fn)).read()
+ break
+ else:
+ raise FontNotFound(font)
+@@ -93,10 +93,10 @@
+ @classmethod
+ def getFonts(self):
+ return [font.rsplit('.', 2)[0] for font
+- in pkg_resources.resource_listdir('pyfiglet', 'fonts')
++ in os.listdir('/usr/share/figlet')
+ if font.endswith(('.flf', '.tlf'))
+- and self.reMagicNumber.search(pkg_resources.resource_stream(
+- 'pyfiglet.fonts', font).readline())]
++ and self.reMagicNumber.search(open(os.path.join(
++ '/usr/share/figlet', font)).readline())]
+
+ def loadFont(self):
+ """
+--- a/setup.py
++++ b/setup.py
+@@ -8,7 +8,6 @@
+ author='Peter Waller (Thanks to Christopher Jones and Stefano Rivera)',
+ author_email='peter.waller at gmail.com',
+ url='https://github.com/pwaller/pyfiglet',
+- packages=['pyfiglet', 'pyfiglet.fonts'],
+- package_data={'pyfiglet.fonts' : ['pyfiglet/fonts/*.flf']},
++ packages=['pyfiglet'],
+ )
+
Deleted: packages/pyfiglet/trunk/debian/patches/py26deprecation.diff
===================================================================
--- packages/pyfiglet/trunk/debian/patches/py26deprecation.diff 2011-05-30 18:45:25 UTC (rev 17245)
+++ packages/pyfiglet/trunk/debian/patches/py26deprecation.diff 2011-05-30 21:15:48 UTC (rev 17246)
@@ -1,20 +0,0 @@
-Description: Python2.6 deprecation squash.
- Correctly subclass str, rather than passing parameters to str.__init__() which
- triggers a deprecation warning in Python 2.6.
-Author: Stefano Rivera <stefanor at debian.org>
-Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/pyfiglet/+bug/603496
-Applied-Upstream: https://github.com/pwaller/pyfiglet/commit/6be9cc3cc6a9b0936b0489668f8f4a5f0da5fbc1
-Last-Update: 2011-02-05
---- a/pyfiglet.py
-+++ b/pyfiglet.py
-@@ -189,8 +189,8 @@
- Rendered figlet font
- """
- class FigletString(str):
-- def __init__(self, *args, **kwargs):
-- str.__init__(self, *args, **kwargs)
-+ def __init__(self, string=''):
-+ str.__init__(string)
-
- # translation map for reversing ascii art / -> \, etc.
- self.__reverse_map__ = '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\')(*+,-.\\0123456789:;>=<?@ABCDEFGHIJKLMNOPQRSTUVWXYZ]/[^_`abcdefghijklmnopqrstuvwxyz}|{~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'
Modified: packages/pyfiglet/trunk/debian/patches/series
===================================================================
--- packages/pyfiglet/trunk/debian/patches/series 2011-05-30 18:45:25 UTC (rev 17245)
+++ packages/pyfiglet/trunk/debian/patches/series 2011-05-30 21:15:48 UTC (rev 17246)
@@ -1,5 +1,2 @@
-dir-error-path.diff
-tlf-support.diff
debian-defaults.diff
-setup.py.diff
-py26deprecation.diff
+font-location.diff
Deleted: packages/pyfiglet/trunk/debian/patches/setup.py.diff
===================================================================
--- packages/pyfiglet/trunk/debian/patches/setup.py.diff 2011-05-30 18:45:25 UTC (rev 17245)
+++ packages/pyfiglet/trunk/debian/patches/setup.py.diff 2011-05-30 21:15:48 UTC (rev 17246)
@@ -1,39 +0,0 @@
-Description: No setup.py in upstream.
- This is a very simple one, only really suitable for the deb.
-Author: Stefano Rivera <stefanor at debian.org>
-Forwarded: https://sourceforge.net/tracker/?func=detail&aid=2933718&group_id=200820&atid=975074
-Applied-Upstream: https://github.com/pwaller/pyfiglet/commit/cb95e192beb5f1a0523465de06258731a8f6b8c6
-Last-Update: 2011-02-05
-
---- /dev/null
-+++ b/setup.py
-@@ -0,0 +1,13 @@
-+#!/usr/bin/python
-+
-+from distutils.core import setup
-+
-+setup(name='pyfiglet',
-+ version='0.4',
-+ description='Pure-python FIGlet implementation',
-+ author='Christopher Jones',
-+ author_email='cjones at insub.org',
-+ url='http://sourceforge.net/projects/pyfiglet/',
-+ py_modules=['pyfiglet'],
-+ scripts=['pyfiglet'],
-+)
---- /dev/null
-+++ b/pyfiglet
-@@ -0,0 +1,13 @@
-+#!/usr/bin/python
-+
-+from sys import stderr, exit
-+
-+from pyfiglet import main, FontNotFound
-+
-+try:
-+ main()
-+except FontNotFound:
-+ stderr.write('Font not found or not compatible. '
-+ 'Please install the toilet-fonts or figlet package for fonts.\n'
-+ "Note that not all toilet's .tlf fonts are compatible.\n")
-+ exit(1)
Deleted: packages/pyfiglet/trunk/debian/patches/tlf-support.diff
===================================================================
--- packages/pyfiglet/trunk/debian/patches/tlf-support.diff 2011-05-30 18:45:25 UTC (rev 17245)
+++ packages/pyfiglet/trunk/debian/patches/tlf-support.diff 2011-05-30 21:15:48 UTC (rev 17246)
@@ -1,79 +0,0 @@
-Description: Add support for toilet's .tlf files.
- There are .tlf files which are compatible with figlet.
-Author: Stefano Rivera <stefanor at debian.org>
-Forwarded: https://github.com/pwaller/pyfiglet/pull/3
-Last Update: 2011-02-05
-
---- a/pyfiglet.py
-+++ b/pyfiglet.py
-@@ -62,7 +62,7 @@
- self.width = {}
- self.data = None
-
-- self.reMagicNumber = re.compile(r'^flf2.')
-+ self.reMagicNumber = re.compile(r'^[ft]lf2.')
- self.reEndMarker = re.compile(r'(.)\s*$')
-
- self.readFontFile()
-@@ -73,8 +73,11 @@
- a superclass to create different font sources.
- """
- def readFontFile(self):
-- fontPath = '%s/%s.flf' % (self.dir, self.font)
-- if os.path.exists(fontPath) is False:
-+ for ext in ('flf', 'tlf'):
-+ fontPath = '%s/%s.%s' % (self.dir, self.font, ext)
-+ if os.path.exists(fontPath):
-+ break
-+ else:
- raise FontNotFound, "%s doesn't exist" % fontPath
-
- try:
-@@ -86,7 +89,8 @@
- finally: fo.close()
-
- def getFonts(self):
-- return [font[:-4] for font in os.walk(self.dir).next()[2] if font.endswith('.flf')]
-+ return [font[:-4] for font in os.walk(self.dir).next()[2]
-+ if font.endswith('.flf') or font.endswith('.tlf')]
-
-
-
-@@ -228,25 +232,27 @@
- if os.path.exists(self.zipfile) is False:
- raise FontNotFound, "%s doesn't exist" % self.zipfile
-
-- fontPath = 'fonts/%s.flf' % self.font
-+ for ext in ('.flf', '.tlf'):
-+ fontPath = 'fonts/%s.%s' % (self.font, ext)
-
-- try:
-- z = ZipFile(self.zipfile, 'r')
-- files = z.namelist()
-- if fontPath not in files:
-- raise FontNotFound, '%s not found in %s' % (self.font, self.zipfile)
-+ try:
-+ z = ZipFile(self.zipfile, 'r')
-+ files = z.namelist()
-+ if fontPath not in files:
-+ raise FontNotFound, '%s not found in %s' % (self.font, self.zipfile)
-
-- self.data = z.read(fontPath)
-+ self.data = z.read(fontPath)
-
-- except Exception, e:
-- raise FontError, "couldn't open %s: %s" % (fontPath, e)
-+ except Exception, e:
-+ raise FontError, "couldn't open %s: %s" % (fontPath, e)
-
- def getFonts(self):
- if os.path.exists(self.zipfile) is False:
- raise FontNotFound, "%s doesn't exist" % self.zipfile
-
- z = ZipFile(self.zipfile, 'r')
-- return [font[6:-4] for font in z.namelist() if font.endswith('.flf')]
-+ return [font[6:-4] for font in z.namelist()
-+ if font.endswith('.flf') and font.endswith('.tlf')]
-
-
-
Added: packages/pyfiglet/trunk/debian/pyfiglet
===================================================================
--- packages/pyfiglet/trunk/debian/pyfiglet (rev 0)
+++ packages/pyfiglet/trunk/debian/pyfiglet 2011-05-30 21:15:48 UTC (rev 17246)
@@ -0,0 +1,13 @@
+#!/usr/bin/python
+
+from sys import stderr, exit
+
+from pyfiglet import main, FontNotFound
+
+try:
+ main()
+except FontNotFound:
+ stderr.write('Font not found or not compatible. '
+ 'Please install the toilet-fonts or figlet package for fonts.\n'
+ "Note that not all toilet's .tlf fonts are compatible.\n")
+ exit(1)
Property changes on: packages/pyfiglet/trunk/debian/pyfiglet
___________________________________________________________________
Added: svn:executable
+ *
Modified: packages/pyfiglet/trunk/debian/rules
===================================================================
--- packages/pyfiglet/trunk/debian/rules 2011-05-30 18:45:25 UTC (rev 17245)
+++ packages/pyfiglet/trunk/debian/rules 2011-05-30 21:15:48 UTC (rev 17246)
@@ -7,8 +7,10 @@
set -e; \
VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+).*,\1,p'); \
uscan --noconf --force-download --rename --download-version=$$VER --destdir=.; \
- tar -x --exclude=fonts.zip --exclude=figfont.txt -f pyfiglet_$$VER.orig.tar.bz2; \
+ mkdir pyfiglet-$$VER+dfsg.orig; \
+ tar -x --exclude=pyfiglet/fonts --exclude=figfont.txt --exclude=.gitignore \
+ --strip-component=1 -C pyfiglet-$$VER+dfsg.orig -f pyfiglet_$$VER.orig.tar.gz; \
GZIP=--best tar -cz --owner root --group root --mode a+rX \
- -f pyfiglet_$$VER+dfsg.orig.tar.gz pyfiglet-$$VER; \
- rm -f pyfiglet_$$VER.orig.tar.bz2; \
- rm -rf pyfiglet-$$VER
+ -f pyfiglet_$$VER+dfsg.orig.tar.gz pyfiglet-$$VER+dfsg.orig; \
+ rm -f pyfiglet_$$VER.orig.tar.gz; \
+ rm -rf pyfiglet-$$VER+dfsg.orig
Modified: packages/pyfiglet/trunk/debian/watch
===================================================================
--- packages/pyfiglet/trunk/debian/watch 2011-05-30 18:45:25 UTC (rev 17245)
+++ packages/pyfiglet/trunk/debian/watch 2011-05-30 21:15:48 UTC (rev 17246)
@@ -1,4 +1,4 @@
version=3
opts=dversionmangle=s/\+dfsg// \
-http://sf.net/pyfiglet/pyfiglet-(.*)\.tar\.bz2
+http://githubredir.debian.net/github/pwaller/pyfiglet/(.*).tar.gz
More information about the Python-modules-commits
mailing list