Commit 77e696cf authored by Stefano Rivera's avatar Stefano Rivera

* New upstream release.

* Refresh patches.
* Bump copyright years.
* Replace source tarball repacking logic with uscan's Files-Excluded
  support.
* Port to pybuild.
  - Build-Depend on dh-python.
  - Remove SOURCES.txt cleanup.
  - Build for Python 3. The Python 3 package has taken over the pyfiglet
    command line tool.
* Run upstream test suite. Build-Depends on toilet.
* Add upstream test suite as an ADT test.
* Bump Standards-Version to 3.9.5, no changes needed.
parent c4165151
pyfiglet (0.7.1+dfsg-1) UNRELEASED; urgency=medium
* New upstream release.
* Refresh patches.
* Bump copyright years.
* Replace source tarball repacking logic with uscan's Files-Excluded
support.
* Port to pybuild.
- Build-Depend on dh-python.
- Remove SOURCES.txt cleanup.
- Build for Python 3. The Python 3 package has taken over the pyfiglet
command line tool.
* Run upstream test suite. Build-Depends on toilet.
* Add upstream test suite as an ADT test.
* Bump Standards-Version to 3.9.5, no changes needed.
-- Stefano Rivera <stefanor@debian.org> Sat, 26 Jul 2014 23:43:41 +0200
pyfiglet (0.6.1+dfsg-1) unstable; urgency=low
[ Stefano Rivera ]
......
......@@ -5,11 +5,16 @@ Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.
Uploaders: Stefano Rivera <stefanor@debian.org>
Build-Depends:
debhelper (>= 8.1),
python-all (>= 2.6.5-13~),
python-setuptools
X-Python-Version: >= 2.5
dh-python,
python-all (>= 2.6),
python-setuptools,
python3-all,
python3-setuptools,
toilet
X-Python-Version: >= 2.6
X-Python3-Version: >= 3.1
XS-Testsuite: autopkgtest
Standards-Version: 3.9.4
Standards-Version: 3.9.5
Homepage: https://github.com/pwaller/pyfiglet
Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/pyfiglet/trunk/
Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/pyfiglet/trunk/
......@@ -25,3 +30,17 @@ Description: Python port of the FIGlet specification
.
This is a Python port of the original C figlet. It can be used on the
commandline or as an Object Oriented driver library in your own programs.
Package: python3-pyfiglet
Architecture: all
Depends: ${misc:Depends}, ${python3:Depends}
Recommends: toilet-fonts
Suggests: figlet
Breaks: python-pyfiglet (<< 0.7.1)
Replaces: python-pyfiglet (<< 0.7.1)
Description: Python 3 port of the FIGlet specification
FIGLet is a program that creates large characters out of ordinary screen
characters. It takes ASCII text and renders it in ASCII art fonts.
.
This is a Python 3 port of the original C figlet. It can be used on the
commandline or as an Object Oriented driver library in your own programs.
......@@ -2,6 +2,9 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: pyfiglet
Upstream-Contact: Peter Waller <peter.waller@gmail.com>
Source: https://github.com/pwaller/pyfiglet
Files-Excluded:
pyfiglet/fonts
doc/figfont.txt
Comment:
The upstream for this package includes non-distributable items is the release
tarball:
......@@ -16,12 +19,12 @@ Comment:
Files: *
Copyright: 2007, Christopher Jones <cjones@gmail.com>,
2011-2013, Peter Waller <peter.waller@gmail.com>,
2011-2013, Stefano Rivera <stefanor@debian.org>
2011-2014, Peter Waller <peter.waller@gmail.com>,
2011-2014, Stefano Rivera <stefanor@debian.org>
License: GPL-2+
Files: debian/*
Copyright: 2010-2013, Stefano Rivera <stefanor@debian.org>
Copyright: 2010-2014, Stefano Rivera <stefanor@debian.org>
License: GPL-2+
License: GPL-2+
......
......@@ -6,12 +6,12 @@ Last-Update: 2011-05-29
--- a/pyfiglet/__init__.py
+++ b/pyfiglet/__init__.py
@@ -32,7 +32,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
@@ -34,7 +34,7 @@
"""
-DEFAULT_FONT='standard'
+DEFAULT_FONT='future'
-DEFAULT_FONT = 'standard'
+DEFAULT_FONT = 'future'
def figlet_format(text, font=DEFAULT_FONT, **kwargs):
......@@ -2,52 +2,73 @@ Description: Use Debian's figlet fonts.
Look in /usr/share/figlet rather than using pkg_resources to find fonts.
Author: Stefano Rivera <stefanor@debian.org>
Forwarded: not-needed
Last-Update: 2011-05-29
Last-Update: 2014-07-26
--- a/pyfiglet/__init__.py
+++ b/pyfiglet/__init__.py
@@ -5,7 +5,7 @@
"""
import os
from __future__ import print_function
-import pkg_resources
+import os.path
import re
import sys
from optparse import OptionParser
@@ -82,8 +82,8 @@
@@ -91,8 +91,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)
- 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
+ data = open(os.path.join('/usr/share/figlet', fn), 'rb').read()
data = data.decode('UTF-8', 'replace')
return data
else:
raise FontNotFound(font)
@@ -93,10 +93,10 @@
@@ -102,14 +102,14 @@
def isValidFont(cls, font):
if not font.endswith(('.flf', '.tlf')):
return False
- f = pkg_resources.resource_stream('pyfiglet.fonts', font)
+ f = open(os.path.join('/usr/share/figlet', font), 'rb')
header = f.readline().decode('UTF-8', 'replace')
return cls.reMagicNumber.search(header)
@classmethod
def getFonts(self):
def getFonts(cls):
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())]
if cls.isValidFont(font)]
def loadFont(self):
"""
@classmethod
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,6 @@
author='Peter Waller (Thanks to Christopher Jones and Stefano Rivera)',
author_email='peter.waller@gmail.com',
url='https://github.com/pwaller/pyfiglet',
- packages=['pyfiglet', 'pyfiglet.fonts'],
- package_data={'pyfiglet.fonts' : ['*.flf']},
+ packages=['pyfiglet'],
)
@@ -46,8 +46,7 @@
author='Peter Waller (Thanks to Christopher Jones and Stefano Rivera)',
author_email='peter.waller@gmail.com',
url='https://github.com/pwaller/pyfiglet',
- packages=['pyfiglet', 'pyfiglet.fonts'],
- package_data={'pyfiglet.fonts': ['*.flf']},
+ packages=['pyfiglet'],
entry_points={
'console_scripts': [
'pyfiglet = pyfiglet:main',
--- a/pyfiglet/test.py
+++ b/pyfiglet/test.py
@@ -39,11 +39,11 @@
outputPyfiglet = f.renderText('foo')
- fontpath = os.path.join('pyfiglet', 'fonts', font)
+ fontpath = os.path.join('/usr/share/figlet', font)
if os.path.isfile(fontpath + '.flf'):
- cmd = ('figlet', '-d', 'pyfiglet/fonts', '-f', font, 'foo')
+ cmd = ('figlet', '-d', '/usr/share/figlet', '-f', font, 'foo')
elif os.path.isfile(fontpath + '.tlf'):
- cmd = ('toilet', '-d', 'pyfiglet/fonts', '-f', font, 'foo')
+ cmd = ('toilet', '-d', '/usr/share/figlet', '-f', font, 'foo')
else:
raise Exception('Missing font file: '+fontpath)
Description: Don't install setuptools entry point scripts.
We have our own command line wrapper.
Author: Stefano Rivera <stefanor@debian.org>
Forwarded: not-needed
Last-Update: 2014-07-27
--- a/setup.py
+++ b/setup.py
@@ -47,9 +47,4 @@
author_email='peter.waller@gmail.com',
url='https://github.com/pwaller/pyfiglet',
packages=['pyfiglet'],
- entry_points={
- 'console_scripts': [
- 'pyfiglet = pyfiglet:main',
- ],
- }
)
debian-defaults.diff
font-location.diff
no-entry-points.diff
#!/usr/bin/make -f
export PYBUILD_NAME=pyfiglet
%:
dh $@ --with python2
dh $@ --with python2,python3 --buildsystem pybuild
override_dh_auto_install:
dh_auto_install
find debian/python-pyfiglet -name SOURCES.txt -delete
override_dh_auto_test:
PYBUILD_SYSTEM=custom \
PYBUILD_TEST_ARGS="{interpreter} -m pyfiglet.test" dh_auto_test
get-packaged-orig-source:
set -ex; \
VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+).*,\1,p'); \
uscan --noconf --download-current-version --destdir=. --rename; \
mkdir pyfiglet-$$VER+dfsg.orig; \
tar -x --exclude=pyfiglet/fonts --exclude=doc/figfont.txt --exclude=.gitignore \
--strip-component=1 -C pyfiglet-$$VER+dfsg.orig -f pyfiglet_$$VER.orig.tar.gz; \
rm 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+dfsg.orig"; \
rm -rf "pyfiglet-$$VER+dfsg.orig"
uscan --noconf --download-current-version --destdir=. --rename --repack
Tests: smoketest
Depends: @, toilet-fonts
Depends: python-pyfiglet, toilet-fonts
Tests: smoketest3
Depends: python3-pyfiglet, toilet-fonts
Tests: suite
Depends: python-all, python-pyfiglet, toilet
Tests: suite3
Depends: python3-all, python3-pyfiglet, toilet
......@@ -3,6 +3,6 @@ set -efu
cd "$ADTTMP"
pyfiglet --help
pyfiglet hello there
pyfiglet -f letter haai
python -m pyfiglet --help
python -m pyfiglet hello there
python -m pyfiglet -f letter haai
#!/bin/sh
set -efu
cd "$ADTTMP"
pyfiglet --help
pyfiglet hello there
pyfiglet -f letter haai
#!/bin/sh
set -efu
cd "$ADTTMP"
for py in $(pyversions --supported); do
$py -m pyfiglet.test
done
#!/bin/sh
set -efu
cd "$ADTTMP"
for py in $(py3versions --supported); do
$py -m pyfiglet.test
done
version=3
opts=dversionmangle=s/\+dfsg// \
http://githubredir.debian.net/github/pwaller/pyfiglet/(.*).tar.gz \
debian
opts=uversionmangle=s/$/\+dfsg/ \
http://githubredir.debian.net/github/pwaller/pyfiglet/(.*).tar.gz
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment