debian/0000775000000000000000000000000012316332532007170 5ustar debian/source/0000775000000000000000000000000012273523546010501 5ustar debian/source/format0000664000000000000000000000001411702662565011710 0ustar 3.0 (quilt) debian/copyright0000664000000000000000000000124012273226275011130 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: python-Levenshtein Source: https://github.com/ztane/python-Levenshtein Files: * Copyright: Copyright (C) 2002-2003 David Necas (Yeti) Copyright (C) 2002 Atakan Gurkan Copyright (C) 1996, 1997, 1998, 1999, 2000 James Theiler, Brian Gough License: GPL-2+ Files: debian/* Copyright: 2008 Nicolas FRANCOIS (Nekral) 2010-2014 Sandro Tosi License: GPL-2+ License: GPL-2+ On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. debian/changelog0000664000000000000000000000413112316332532011041 0ustar python-levenshtein (0.11.2-1build1) trusty; urgency=medium * No change rebuild to drop python3.3 compiled extension. -- Dimitri John Ledkov Mon, 31 Mar 2014 19:35:06 +0100 python-levenshtein (0.11.2-1) unstable; urgency=low [ Jakub Wilk ] * Use canonical URIs for Vcs-* fields. [ Sandro Tosi ] * New upstream release * debian/control - switch me to Maintainer (team to Uploaders) - bump Standards-Version to 3.9.5 (no changes needed) - add python{,3}-setuptools to b-d * debian/watch - udpate download location * debian/{control, copyright} - update homepage information * debian/copyright - convert to DEP-5 format * Switch to dh_python2/3 * added Python 3 packages -- Sandro Tosi Sun, 02 Feb 2014 21:15:26 +0100 python-levenshtein (0.10.1-2) unstable; urgency=low * debian/control - adopt it under DMPT umbrella; thanks to Nicolas for his previous work; Closes: #654348 - add Vcs-* fields - rename XS-P-V fields to X-P-V - remove useless XB-P-V field - bump Standards-Version to 3.9.2 - added ${misc:Depends} to binary Depends - update Homepage field; Closes: #479626 * Switch to 3.0 (quilt) source format * debian/{control, rules} - use python-support instead of python-central; Closes: #617011 - build debug extension * Switch to short debian/rules file format * debian/watch - remove template header -- Sandro Tosi Tue, 10 Jan 2012 19:06:55 +0100 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 debian/control0000664000000000000000000000741712316332532010604 0ustar Source: python-levenshtein Section: python Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Sandro Tosi Uploaders: Debian Python Modules Team Build-Depends: python-all-dev (>= 2.5.3-1~), python-all-dbg, python3-all-dev, python3-all-dbg, dh-python, debhelper (>= 7.0.50~), python-setuptools, python3-setuptools X-Python-Version: all X-Python3-Version: >= 3.0 Standards-Version: 3.9.5 Homepage: https://github.com/ztane/python-Levenshtein Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/python-levenshtein/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/python-levenshtein/trunk/ Package: python-levenshtein Architecture: any Depends: ${shlibs:Depends}, ${python:Depends}, ${misc:Depends} 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. Package: python3-levenshtein Architecture: any Depends: ${shlibs:Depends}, ${python3:Depends}, ${misc:Depends} Description: extension for computing string similarities and edit distances (Python 3) 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. . This package contains Levenshtein for Python 3. Package: python-levenshtein-dbg Section: debug Priority: extra Architecture: any Depends: python-levenshtein (= ${binary:Version}), ${shlibs:Depends}, ${python:Depends}, ${misc:Depends} Description: extension for computing string similarities and edit distances(debug extension) 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. . This package contains the extensions built for the Python debug interpreter. Package: python3-levenshtein-dbg Section: debug Priority: extra Architecture: any Depends: python3-levenshtein (= ${binary:Version}), ${shlibs:Depends}, ${python3:Depends}, ${misc:Depends} Description: extension for computing string similarities and edit distances(py3k debug ext) 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. . This package contains the extensions built for the Python 3 debug interpreter. debian/rules0000775000000000000000000000316412273517151010260 0ustar #!/usr/bin/make -f # -*- makefile -*- PY2VERS=$(shell pyversions -vr) PY3VERS=$(shell py3versions -vr) PYLIBPATH := $(shell python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print b.build_platlib") %: dh $@ --with python2,python3 override_dh_auto_build: set -e ; \ for py in $(PY2VERS) $(PY3VERS); do \ python$$py setup.py build ; \ python$$py-dbg setup.py build ; \ done # build doc PYTHONPATH=$(PYLIBPATH) ./gendoc.sh override_dh_auto_clean: rm -f Levenshtein.html NEWS.xhtml dh_auto_clean override_dh_auto_install: set -e ; \ for py in $(PY2VERS); do \ python$$py setup.py install --root $(CURDIR)/debian/python-levenshtein --install-layout=deb ; \ python$$py-dbg setup.py install --root $(CURDIR)/debian/python-levenshtein-dbg --install-layout=deb ; \ done for py in $(PY3VERS); do \ python$$py setup.py install --root $(CURDIR)/debian/python3-levenshtein --install-layout=deb ; \ python$$py-dbg setup.py install --root $(CURDIR)/debian/python3-levenshtein-dbg --install-layout=deb ; \ done find $(CURDIR)/debian/python-levenshtein-dbg -type f -name "*.egg-info" -delete find $(CURDIR)/debian/python3-levenshtein-dbg -type f -name "*.egg-info" -delete override_dh_installdocs: dh_installdocs README.rst NEWS NEWS.xhtml Levenshtein.html override_dh_installexamples: dh_installexamples StringMatcher.py override_dh_strip: ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) dh_strip -p python-levenshtein --dbg-package=python-levenshtein-dbg dh_strip -p python3-levenshtein --dbg-package=python3-levenshtein-dbg endif debian/watch0000664000000000000000000000014712273157735010237 0ustar version=2 https://pypi.python.org/packages/source/p/python-Levenshtein/python-Levenshtein-(.*)\.tar.gz debian/patches/0000775000000000000000000000000012273523546010630 5ustar debian/patches/add_missing_genextdoc.py.patch0000664000000000000000000001652111702630037016614 0ustar 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() debian/patches/series0000664000000000000000000000003711702630037012033 0ustar add_missing_genextdoc.py.patch debian/compat0000664000000000000000000000000211703072767010400 0ustar 7 debian/python-levenshtein.doc-base0000664000000000000000000000046211702630037014433 0ustar 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