--- python-levenshtein-0.10.1.orig/debian/compat +++ python-levenshtein-0.10.1/debian/compat @@ -0,0 +1 @@ +5 --- python-levenshtein-0.10.1.orig/debian/python-levenshtein.doc-base +++ python-levenshtein-0.10.1/debian/python-levenshtein.doc-base @@ -0,0 +1,9 @@ +Document: python-levenshtein +Title: python-levenshtein documentation +Author: David Necas (Yeti) +Abstract: The API documentation of the Python Levenshtein package +Section: Text + +Format: HTML +Index: /usr/share/doc/python-levenshtein/Levenshtein.html +Files: /usr/share/doc/python-levenshtein/Levenshtein.html --- python-levenshtein-0.10.1.orig/debian/rules +++ python-levenshtein-0.10.1/debian/rules @@ -0,0 +1,63 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +PYVERS=$(shell pyversions -vr) + +include /usr/share/quilt/quilt.make + +build: build-stamp +build-stamp: patch $(PYVERS:%=build-python%) + touch $@ + +build-python%: + python$* setup.py build + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + rm -rf build + rm -f Levenshtein.html NEWS.xhtml + dh_clean + +install: build $(PYVERS:%=install-python%) + python_sitearch=$$(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)"); \ + PYTHONPATH=debian/python-levenshtein/$$python_sitearch ./gendoc.sh Levenshtein + + +install-prereq: + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + +install-python%: install-prereq + python$* setup.py install --root $(CURDIR)/debian/python-levenshtein --install-layout=deb + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs README NEWS Levenshtein.html + dh_installexamples StringMatcher.py + dh_strip + dh_compress + dh_fixperms + dh_python2 + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- python-levenshtein-0.10.1.orig/debian/control +++ python-levenshtein-0.10.1/debian/control @@ -0,0 +1,24 @@ +Source: python-levenshtein +Section: python +Priority: optional +Maintainer: Nicolas FRANCOIS (Nekral) +Build-Depends: python-all-dev (>= 2.5.3-1~), debhelper (>= 5.0.37.2), quilt (>= 0.40) +XS-Python-Version: all +Standards-Version: 3.7.3 +Homepage: https://sourceforge.net/project/showfiles.php?group_id=91920&package_id=260161 + +Package: python-levenshtein +Architecture: any +Depends: ${shlibs:Depends}, ${python:Depends} +XB-Python-Version: ${python:Versions} +Description: extension for computing string similarities and edit distances + The Levenshtein module computes Levenshtein distances, similarity ratios, + generalized medians and set medians of Unicode or non-Unicode strings. + Because it's implemented in C, it's much faster than the corresponding + Python library functions and methods. + . + The Levenshtein distance is the minimum number of single-character + insertions, deletions, and substitutions to transform one string into + another. + . + It is useful for spell checking, or fuzzy matching of gettext messages. --- python-levenshtein-0.10.1.orig/debian/copyright +++ python-levenshtein-0.10.1/debian/copyright @@ -0,0 +1,27 @@ +This package was debianized by Nicolas FRANCOIS (Nekral) + on Sat, 29 Mar 2008 18:04:18 +0100, +based on the RPM specs from Dwayne Bailey. + +It was downloaded from http://prdownloads.sourceforge.net/translate + + +Copyright: + Copyright (C) 2002-2003 David Necas (Yeti) + Copyright (C) 2002 Atakan Gurkan + Copyright (C) 1996, 1997, 1998, 1999, 2000 James Theiler, Brian Gough + +Upstream Authors: + + David Necas (Yeti) + + It is now maintained by the translate-toolkit maintainers. + +License: + + Released under the GPL license version 2 or later. + +GPL: +---- + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. --- python-levenshtein-0.10.1.orig/debian/changelog +++ python-levenshtein-0.10.1/debian/changelog @@ -0,0 +1,28 @@ +python-levenshtein (0.10.1-1.1ubuntu1) precise; urgency=low + + * Build using dh_python2. + + -- Matthias Klose Wed, 14 Dec 2011 16:20:49 +0100 + +python-levenshtein (0.10.1-1.1build1) natty; urgency=low + + * Rebuild to add support for python 2.7. + + -- Matthias Klose Fri, 03 Dec 2010 00:11:10 +0000 + +python-levenshtein (0.10.1-1.1) unstable; urgency=low + + * Non-maintainer upload, to prepare for Python 2.6 transition + * debian/rules + - use '--install-layout=deb' when installing the module; thanks to Jakub + Wilk for the report; Closes: #571507 + * debian/control + - bump b-d in python-all-dev to '>= 2.5.3-1~', to support install-layout + + -- Sandro Tosi Mon, 01 Mar 2010 11:35:26 +0100 + +python-levenshtein (0.10.1-1) unstable; urgency=low + + * Initial Release. Closes: #473274 + + -- Nicolas FRANCOIS (Nekral) Sat, 29 Mar 2008 18:04:18 +0100 --- python-levenshtein-0.10.1.orig/debian/watch +++ python-levenshtein-0.10.1/debian/watch @@ -0,0 +1,6 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# Site Directory Pattern Version Script +version=2 +http://sf.net/translate/python-Levenshtein-(.*).tar.(?:gz|bz2) --- python-levenshtein-0.10.1.orig/debian/patches/add_missing_genextdoc.py.patch +++ python-levenshtein-0.10.1/debian/patches/add_missing_genextdoc.py.patch @@ -0,0 +1,219 @@ +Index: python-Levenshtein-0.10.1/genextdoc.py +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ python-Levenshtein-0.10.1/genextdoc.py 2008-03-29 19:00:28.182765776 +0100 +@@ -0,0 +1,214 @@ ++#!/usr/bin/python ++# Simple Python extension module doc generator. ++# @(#) $Id: genextdoc.py,v 1.1 2004/05/25 11:13:23 carlo Exp $ ++# Written by Yeti ++# This program is in the public domain. ++import re, sys, types, inspect ++from cgi import escape as q ++ ++args = sys.argv ++args.pop(0) ++if not args: sys.exit(0) ++ ++selfcontained = False ++if args[0].startswith('-') and 'selfcontained'.startswith(args[0].strip('-')): ++ selfcontained = True ++ args.pop(0) ++if not args: sys.exit(0) ++modname = args.pop(0) ++plain_docs = args ++ ++html_head = """\ ++ ++ ++ ++%s %s ++ ++""" ++ ++html_foot = """\ ++ ++ ++""" ++ ++def split_para(doc): ++ p = [] ++ for x in doc.split('\n\n'): ++ x = x.strip() ++ if x.find('\n>>>') > -1: ++ h, t = x.split('\n>>>', 1) ++ p.append(h) ++ p.append('>>>' + t) ++ else: ++ p.append(x) ++ return p ++ ++def get_doc(members): ++ try: doc = members['__doc__'] ++ except KeyError: pass ++ if doc: return doc ++ try: doc = 'Python module %s' % members['__name__'] ++ except KeyError: pass ++ if doc: return doc ++ else: return 'A Python module' ++ ++def format_synopsis(synopsis, link=False, classname=None): ++ lst = synopsis.split('\n') ++ for i, s in zip(range(len(lst)), lst): ++ m = re.match(r'(?P\w+)(?P.*)', s) ++ args = re.sub(r'([a-zA-Z]\w+)', r'\1', m.group('args')) ++ func = m.group('func') ++ if link: ++ if classname: ++ func = '%s' % (classname, func, func) ++ else: ++ func = '%s' % (func, func) ++ lst[i] = func + args ++ return '
\n'.join(lst) ++ ++def format_para(p): ++ if not p: return '' ++ doc = '' ++ if p.startswith('>>>'): doc += '
\n%s\n
\n' % q(p) ++ else: ++ if not re.search('^- ', p, re.M): doc += '

%s

\n' % q(p) ++ else: ++ p = re.split('(?m)^- ', p) ++ if p[0]: doc += '

%s

\n' % q(p[0].strip()) ++ del p[0] ++ doc += ('
    %s
\n' ++ % '\n'.join(['
  • %s
  • ' % q(p.strip()) for p in p])) ++ return doc ++ ++def preprocess_routine(name, doc): ++ parts = split_para(doc) ++ if parts: summary = parts.pop(0) ++ else: summary = 'FIXME' ++ if parts and re.match(r'\w+\(.*\)', parts[0]): synopsis = parts.pop(0) ++ else: synopsis = name + '()' ++ return {'synopsis': synopsis, 'summary': summary, 'details': parts} ++ ++def analyse(obj): ++ members = obj.__dict__ ++ if inspect.isclass(obj): ++ main_doc = preprocess_routine(obj.__name__, get_doc(members)) ++ bases = [x.__name__ for x in obj.__bases__] ++ else: ++ main_doc = split_para(get_doc(members)) ++ bases = [] ++ routines = {} ++ classes = {} ++ data = {} ++ for name, m in members.items(): ++ if name.startswith('__'): continue ++ try: ++ mro = list(inspect.getmro(m)) ++ if mro[0] != m: continue ++ except AttributeError: pass ++ if inspect.isroutine(m): ++ try: doc = m.__doc__ ++ except KeyError: pass ++ if not doc: doc = 'FIXME' ++ routines[name] = preprocess_routine(name, doc) ++ continue ++ if inspect.isclass(m): ++ classes[name] = analyse(m) ++ continue ++ t = type(m) ++ if t == types.IntType or t == types.StringType: ++ data[name] = repr(m) ++ else: ++ data[name] = m.__doc__ ++ return {'name': obj.__name__, 'doc': main_doc, 'routines': routines, ++ 'classes': classes, 'data': data, 'bases': bases} ++ ++def format(tree, level, prefix=''): ++ name = tree['name'] ++ if prefix: fullname = '%s-%s' % (prefix, name) ++ else: fullname = name ++ ##### Main doc ++ doc = [] ++ if level > 1: ++ doc = ['' % (level, fullname)] ++ try: doc.append(format_synopsis(tree['doc']['synopsis'])) ++ except TypeError: ++ doc.append(name) ++ doc.append('\n' % level) ++ if tree.has_key('bases'): ++ doc.append('

    Bases: %s.

    \n' % ', '.join(tree['bases'])) ++ try: lst = [tree['doc']['summary']] + tree['doc']['details'] ++ except TypeError: lst = tree['doc'] ++ for p in lst: doc.append(format_para(p)) ++ ##### Table of contents ++ routines = tree['routines'].keys() ++ classes = tree['classes'].keys() ++ data = tree['data'].keys() ++ if routines: ++ routines.sort() ++ if level == 1: doc.append('

    Functions:

    \n') ++ else: doc.append('

    Methods:

    \n') ++ doc.append('
      \n') ++ for r in routines: ++ synopsis = tree['routines'][r]['synopsis'] ++ doc.append('
    • %s
    • \n' % format_synopsis(synopsis, True, ++ fullname)) ++ doc.append('
    \n') ++ if classes: ++ classes.sort() ++ doc.append('

    Classes:

    \n') ++ doc.append('
      \n') ++ for r in classes: ++ synopsis = tree['classes'][r]['doc']['synopsis'] ++ doc.append('
    • %s
    • \n' % format_synopsis(synopsis, True, ++ fullname)) ++ doc.append('
    \n') ++ if data: ++ data.sort() ++ doc.append('

    Data:

    \n') ++ doc.append('
      \n') ++ for r in data: ++ doc.append('
    • %s = %s
    • \n' % (r, q(tree['data'][r]))) ++ doc.append('
    \n') ++ ##### Functions ++ if routines: ++ if level == 1: doc.append('
    \n') ++ doc.append('
    \n') ++ for r in routines: ++ doc.append('
    ' % (fullname, r)) ++ rt = tree['routines'][r] ++ doc.append('%s
    \n
    ' % format_synopsis(rt['synopsis'])) ++ for p in [rt['summary']] + rt['details']: ++ doc.append(format_para(p)) ++ doc.append('
    \n') ++ doc.append('
    \n') ++ ##### Classes ++ if classes: ++ for r in classes: ++ doc.append('
    \n') ++ doc.append(format(tree['classes'][r], level+1, fullname)) ++ return ''.join(doc) ++ ++exec 'import %s as __test__' % modname ++doctree = analyse(__test__) ++document = format(doctree, 1) ++print modname + '.html' ++fh = file(modname + '.html', 'w') ++if selfcontained: fh.write(html_head % (modname, 'module API')) ++fh.write(document) ++if selfcontained: fh.write(html_foot) ++fh.close() ++for f in plain_docs: ++ try: fh = file(f, 'r') ++ except: continue ++ document = fh.read() ++ fh.close() ++ print f + '.xhtml' ++ fh = file(f + '.xhtml', 'w') ++ if selfcontained: fh.write(html_head % (modname, f)) ++ fh.write('

    %s %s

    \n\n' % (modname, f)) ++ fh.write('
    \n')
    ++    fh.write(document)
    ++    fh.write('
    \n') ++ if selfcontained: fh.write(html_foot) ++ fh.close() --- python-levenshtein-0.10.1.orig/debian/patches/series +++ python-levenshtein-0.10.1/debian/patches/series @@ -0,0 +1 @@ +add_missing_genextdoc.py.patch