Source: beets Severity: wishlist Dear Maintainer,
as the naming conflicts with the jellyfish packages has been resolved and finally python-jellyfish is available on Debian [1], would it be possible to drop the "no-jellyfish" patch and introduce a proper dependency instead for future releases? I'm including a very tiny svn diff against the current revision. Thanks as well for your patience during the process, and for the workaround, [1] https://packages.qa.debian.org/p/python-jellyfish.html -- Diego M. Rodriguez 36B3 42A9 9F2F 2CFB F79B FF9B B6C4 B901 06BC E232
Index: debian/control =================================================================== --- debian/control (revision 13609) +++ debian/control (working copy) @@ -13,6 +13,7 @@ python-bs4, python-enum34 (>= 1.0.4), python-flask, + python-jellyfish, python-mock, python-mpd, python-munkres, Index: debian/patches/no-jellyfish =================================================================== --- debian/patches/no-jellyfish (revision 13609) +++ debian/patches/no-jellyfish (working copy) @@ -1,86 +0,0 @@ -Description: Bundle levenshtein_distance from jellyfish - Debian already has a Python library called jellyfish. While we resolve that - problem, let's avoid the need for re-packaging jellyfish. -Bug-Debian: https://bugs.debian.org/806716 -Author: Stefano Rivera <[email protected]> - ---- a/beets/autotag/hooks.py -+++ b/beets/autotag/hooks.py -@@ -25,7 +25,7 @@ - from beets import config - from beets.util import as_string - from beets.autotag import mb --from jellyfish import levenshtein_distance -+from beets.util._jellyfish import levenshtein_distance - from unidecode import unidecode - - log = logging.getLogger('beets') ---- /dev/null -+++ b/beets/util/_jellyfish.py -@@ -0,0 +1,56 @@ -+# Borrowed from Jellyfish (https://github.com/jamesturk/jellyfish) -+# Copyright (c) 2015, James Turk -+# Copyright (c) 2015, Sunlight Foundation -+# -+# All rights reserved. -+# -+# Redistribution and use in source and binary forms, with or without -+# modification, are permitted provided that the following conditions are met: -+# -+# * Redistributions of source code must retain the above copyright notice, -+# this list of conditions and the following disclaimer. -+# * Redistributions in binary form must reproduce the above copyright -+# notice, this list of conditions and the following disclaimer in the -+# documentation and/or other materials provided with the distribution. -+# -+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -+# POSSIBILITY OF SUCH DAMAGE. -+ -+_range = xrange -+_no_bytes_err = 'expected unicode, got str' -+ -+ -+def levenshtein_distance(s1, s2): -+ if isinstance(s1, bytes) or isinstance(s2, bytes): -+ raise TypeError(_no_bytes_err) -+ -+ if s1 == s2: -+ return 0 -+ rows = len(s1)+1 -+ cols = len(s2)+1 -+ -+ if not s1: -+ return cols-1 -+ if not s2: -+ return rows-1 -+ -+ prev = None -+ cur = range(cols) -+ for r in _range(1, rows): -+ prev, cur = cur, [r] + [0]*(cols-1) -+ for c in _range(1, cols): -+ deletion = prev[c] + 1 -+ insertion = cur[c-1] + 1 -+ edit = prev[c-1] + (0 if s1[r-1] == s2[c-1] else 1) -+ cur[c] = min(edit, deletion, insertion) -+ -+ return cur[-1] ---- a/setup.py -+++ b/setup.py -@@ -92,7 +92,6 @@ - 'unidecode', - 'musicbrainzngs>=0.4', - 'pyyaml', -- 'jellyfish', - ] + (['colorama'] if (sys.platform == 'win32') else []), - - tests_require=[ Index: debian/patches/series =================================================================== --- debian/patches/series (revision 13609) +++ debian/patches/series (working copy) @@ -1,5 +1,4 @@ fix-test_hidden -no-jellyfish fix-test_mediafile_edge fix-test_nonexistent_file skip-test_query-path-tests
signature.asc
Description: Digital signature

