summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Kitterman <scott@kitterman.com>2019-01-05 08:16:42 (GMT)
committerScott Kitterman <scott@kitterman.com>2019-01-05 08:16:42 (GMT)
commit077afee8a74ffad3f6c8d7c23aa01c6936394d92 (patch)
treeed3e9abf7b6e03bcda296325caa09f0f92b333f5
parentcf8dad971e7bf914ea3450025e8eed560177caa5 (diff)
parente0365e817868827f1b225291b0ff152657af144f (diff)
downloadpyphen-master.zip
pyphen-master.tar.gz
pyphen-master.tar.bz2
pyphen (0.9.5-2) unstable; urgency=mediumHEADmaster
* Drop lintian-override for new-package-should-not-package-python2-module as requested by lamby * Python 2 version needed to support potential backport to stretch [dgit import unpatched pyphen 0.9.5-2]
-rw-r--r--debian/changelog24
-rw-r--r--debian/compat1
-rw-r--r--debian/control45
-rw-r--r--debian/copyright161
-rw-r--r--debian/gbp.conf2
-rw-r--r--debian/patches/0001-Use-system-hyphen-dictionaries.patch37
-rw-r--r--debian/patches/0002-Add-tests-from-github.patch151
-rw-r--r--debian/patches/0003-Disable-tests-needing-missing-fallback-data.patch97
-rw-r--r--debian/patches/series3
-rw-r--r--debian/python-pyphen.docs1
-rw-r--r--debian/python3-pyphen.docs1
-rwxr-xr-xdebian/rules24
-rw-r--r--debian/source/format1
-rw-r--r--debian/tests/control2
-rw-r--r--debian/tests/py25
-rw-r--r--debian/tests/py35
-rw-r--r--debian/watch3
17 files changed, 563 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..3d2bc07
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,24 @@
+pyphen (0.9.5-2) unstable; urgency=medium
+
+ * Drop lintian-override for new-package-should-not-package-python2-module as
+ requested by lamby
+ * Python 2 version needed to support potential backport to stretch
+
+ -- Scott Kitterman <scott@kitterman.com> Sat, 05 Jan 2019 03:16:42 -0500
+
+pyphen (0.9.5-1) unstable; urgency=low
+
+ * Initial Debian package (Closes: #917039)
+ * Add d/p/0001-Use-system-hyphen-dictionaries.patch so that duplicate hyphen
+ dictionaries are not shipped in the binaries and system dictionaries are
+ used
+ * Enable build and autopkgtests
+ - Add d/p/0002-Add-tests-from-github.patch so that upstream tests are
+ available
+ - Add d/p/0003-Disable-tests-needing-missing-fallback-data.patch so that
+ tests the need data not currently available from Debian hyphen
+ dictionaries are not run
+ - Autopkgtest runs enabled upstream tests for all supported python and
+ python3 versions
+
+ -- Scott Kitterman <scott@kitterman.com> Fri, 04 Jan 2019 18:27:12 -0500
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..b4de394
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+11
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..0e5a2b2
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,45 @@
+Source: pyphen
+Section: python
+Priority: optional
+Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
+Uploaders: Scott Kitterman <scott@kitterman.com>,
+ Daniel Kahn Gillmor <dkg@fifthhorseman.net>
+Build-Depends: debhelper (>= 11),
+ dh-python,
+ hyphen-nl,
+ python,
+ python-pytest,
+ python-setuptools,
+ python3,
+ python3-pytest,
+ python3-setuptools
+Vcs-Git: https://salsa.debian.org/python-team/modules/pyphen.git
+Vcs-Browser: https://salsa.debian.org/python-team/modules/pyphen
+Standards-Version: 4.3.0
+Homepage: https://pyphen.org/
+
+Package: python-pyphen
+Architecture: all
+Depends: hyphen-en-us | hyphen-hyphenation-patterns,
+ ${misc:Depends},
+ ${python:Depends}
+Description: Python hyphenation module
+ Pyphen is a pure Python module to hyphenate text using existing Hunspell
+ hyphenation dictionaries. This module is a fork of python-hyphenator, written
+ by Wilbert Berendsen. It uses Debian system hyphenation packages (package
+ hyphen-(language code) rather than the embedded set provided by upstream.
+ .
+ This is the Python (2) version of the package.
+
+Package: python3-pyphen
+Architecture: all
+Depends: hyphen-en-us | hyphen-hyphenation-patterns,
+ ${misc:Depends},
+ ${python3:Depends}
+Description: Python 3 hyphenation module
+ Pyphen is a pure Python 3 module to hyphenate text using existing Hunspell
+ hyphenation dictionaries. This module is a fork of python-hyphenator, written
+ by Wilbert Berendsen. It uses Debian system hyphenation packages (package
+ hyphen-(language code) rather than the embedded set provided by upstream.
+ .
+ This is the Python 3 version of the package.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..54a5ad8
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,161 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Pyphen
+Upstream-Contact: Guillaume Ayoub <guillaume.ayoub@kozea.fr>
+Source: https://github.com/Kozea/Pyphen
+
+Files: *
+Copyright: Copyright 2008 - Wilbert Berendsen <info@wilbertberendsen.nl>,
+ 2012-2013 - Guillaume Ayoub <guillaume.ayoub@kozea.fr>
+License: GPL-2+/LGPL-2.1+/MPL-1.1
+
+Files: debian/*
+Copyright: 2019 Scott Kitterman <scott@kitterman.com>
+License: GPL-2+/LGPL-2.1+/MPL-1.1
+
+Files: pyphen/dictionaries/hyph_hu*.dic
+Copyright: Copyright (C) 2003 Nagy Bence <nagybence (at) tipogral (dot) hu>
+License: GPL-2+/LGPL-2.1+/MPL-1.1
+
+Files: pyphen/dictionaries/hyph_de*.dic
+Copyright: Marco Huggenberger <marco@by-night.ch>, Daniel Naber
+ <naber@danielnaber.de>, Karl Zeiler <karl.zeiler@t-online.de>
+License: LGPL-2+
+
+Files: pyphen/dictionaries/hyph_af*.dic
+Copyright: Copyright (C) 2005 Friedel Wolff
+License: LGPL-2.1+
+
+Files: pyphen/dictionaries/hyph_zu*.dic
+Copyright: Copyright (C) 2005, 2007 Friedel Wolff
+License: LGPL-2.1
+
+Files: pyphen/dictionaries/hyph_te*.dic
+Copyright: Copyright (C) 2008-2009 Santhosh Thottingal
+ <santhosh.thottingal@gmail.com>
+License: GPL-3+
+
+License: GPL-2+/LGPL-2.1+/MPL-1.1
+ This library is free software. It is released under the
+ GPL 2.0+/LGPL 2.1+/MPL 1.1 tri-license. See COPYING.GPL, COPYING.LGPL and
+ COPYING.MPL for more details.
+ .
+ GPL 2:
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ .
+ On Debian systems, the full text of the GPL version 2.0 can be found in the
+ file `/usr/share/common-licenses/GPL-2'.
+ .
+ LGPL 2.1:
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+ .
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the full text of the LGPL version 2.1 can be found in the
+ file `/usr/share/common-licenses/LGPL-2.1'.
+ .
+ MPL 1.1
+ The contents of this file are subject to the Mozilla Public License
+ Version 1.1 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ https://www.mozilla.org/MPL/
+ .
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ License for the specific language governing rights and limitations
+ under the License.
+ .
+ On Debian systems, the full text of the MPL version 1.1 can be found in the
+ file `/usr/share/common-licenses/MPL-1.1'.
+
+License: LGPL-2+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+ .
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+ .
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the full text of the LGPL version 2.0 can be found in the
+ file `/usr/share/common-licenses/LGPL-2'.
+
+License: LGPL-2.1+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+ .
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the full text of the LGPL version 2.1 can be found in the
+ file `/usr/share/common-licenses/LGPL-2.1'.
+
+License: LGPL-2.1
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License.
+ .
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the full text of the LGPL version 2.1 can be found in the
+ file `/usr/share/common-licenses/LGPL-2.1'.
+
+License: GPL-3+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the full text of the GPL version 3.0 can be found in the
+ file `/usr/share/common-licenses/GPL-3'.
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..3879982
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,2 @@
+[DEFAULT]
+debian-branch=debian/master
diff --git a/debian/patches/0001-Use-system-hyphen-dictionaries.patch b/debian/patches/0001-Use-system-hyphen-dictionaries.patch
new file mode 100644
index 0000000..152e2d8
--- /dev/null
+++ b/debian/patches/0001-Use-system-hyphen-dictionaries.patch
@@ -0,0 +1,37 @@
+From: Scott Kitterman <scott@kitterman.com>
+Date: Fri, 4 Jan 2019 14:59:07 -0500
+Subject: Use system hyphen dictionaries
+
+---
+ pyphen/__init__.py | 3 +--
+ setup.py | 3 ---
+ 2 files changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/pyphen/__init__.py b/pyphen/__init__.py
+index 6bf92e4..857f94a 100755
+--- a/pyphen/__init__.py
++++ b/pyphen/__init__.py
+@@ -42,8 +42,7 @@ parse_hex = re.compile(r'\^{2}([0-9a-f]{2})').sub
+ parse = re.compile(r'(\d?)(\D?)').findall
+
+ try:
+- from pkg_resources import resource_filename
+- dictionaries_root = resource_filename('pyphen', 'dictionaries')
++ dictionaries_root = '/usr/share/hyphen'
+ except ImportError:
+ dictionaries_root = os.path.join(os.path.dirname(__file__), 'dictionaries')
+
+diff --git a/setup.py b/setup.py
+index 329ebcf..719c205 100755
+--- a/setup.py
++++ b/setup.py
+@@ -28,9 +28,6 @@ setup(
+ version='0.9.5',
+ provides=['pyphen'],
+ packages=['pyphen'],
+- package_data={'pyphen': [os.path.join(
+- os.path.dirname(__file__), 'dictionaries', '*.dic')]},
+- include_package_data=True,
+ author='Guillaume Ayoub',
+ author_email='guillaume.ayoub@kozea.fr',
+ url='https://github.com/Kozea/Pyphen',
diff --git a/debian/patches/0002-Add-tests-from-github.patch b/debian/patches/0002-Add-tests-from-github.patch
new file mode 100644
index 0000000..a72eae6
--- /dev/null
+++ b/debian/patches/0002-Add-tests-from-github.patch
@@ -0,0 +1,151 @@
+From: Scott Kitterman <scott@kitterman.com>
+Date: Fri, 4 Jan 2019 16:30:17 -0500
+Subject: Add tests from github
+
+---
+ test.py | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 136 insertions(+)
+ create mode 100644 test.py
+
+diff --git a/test.py b/test.py
+new file mode 100644
+index 0000000..858342d
+--- /dev/null
++++ b/test.py
+@@ -0,0 +1,136 @@
++# This file is part of Pyphen
++#
++# Copyright 2013 - Guillaume Ayoub <guillaume.ayoub@kozea.fr>
++#
++# This library is free software: you can redistribute it and/or modify it under
++# the terms of the GNU Lesser General Public License as published by the Free
++# Software Foundation, either version 2.1 of the License, or (at your option)
++# any later version.
++#
++# This library is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
++# details.
++#
++# You should have received a copy of the GNU Lesser General Public License
++# along with Pyphen. If not, see <http://www.gnu.org/licenses/>.
++
++"""
++
++Pyphen Tests
++============
++
++Tests can be launched with:
++
++- Pytest (``py.test test.py``).
++- Nose (``nosetests``).
++
++"""
++
++
++from __future__ import unicode_literals
++
++import pyphen
++
++
++def test_inserted():
++ """Test the ``inserted`` method."""
++ dic = pyphen.Pyphen(lang='nl_NL')
++ assert dic.inserted('lettergrepen') == 'let-ter-gre-pen'
++
++
++def test_wrap():
++ """Test the ``wrap`` method."""
++ dic = pyphen.Pyphen(lang='nl_NL')
++ assert dic.wrap('autobandventieldopje', 11) == (
++ 'autoband-', 'ventieldopje')
++
++
++def test_iterate():
++ """Test the ``iterate`` method."""
++ dic = pyphen.Pyphen(lang='nl_NL')
++ assert tuple(dic.iterate('Amsterdam')) == (
++ ('Amster', 'dam'), ('Am', 'sterdam'))
++
++
++def test_fallback_dict():
++ """Test the ``iterate`` method with a fallback dict."""
++ dic = pyphen.Pyphen(lang='nl_NL-variant')
++ assert tuple(dic.iterate('Amsterdam')) == (
++ ('Amster', 'dam'), ('Am', 'sterdam'))
++
++
++def test_missing_dict():
++ """Test a missing dict."""
++ try:
++ pyphen.Pyphen(lang='mi_SS')
++ except KeyError:
++ pass
++ else: # pragma: no cover
++ raise Exception('Importing a missing dict must raise a KeyError')
++
++
++def test_personal_dict():
++ """Test a personal dict."""
++ dic = pyphen.Pyphen(lang='fr')
++ assert dic.inserted('autobandventieldopje') != 'au-to-band-ven-tiel-dop-je'
++ pyphen.LANGUAGES['fr'] = pyphen.LANGUAGES['nl_NL']
++ dic = pyphen.Pyphen(lang='fr')
++ assert dic.inserted('autobandventieldopje') == 'au-to-band-ven-tiel-dop-je'
++
++
++def test_left_right():
++ """Test the ``left`` and ``right`` parameters."""
++ dic = pyphen.Pyphen(lang='nl_NL')
++ assert dic.inserted('lettergrepen') == 'let-ter-gre-pen'
++ dic = pyphen.Pyphen(lang='nl_NL', left=4)
++ assert dic.inserted('lettergrepen') == 'letter-gre-pen'
++ dic = pyphen.Pyphen(lang='nl_NL', right=4)
++ assert dic.inserted('lettergrepen') == 'let-ter-grepen'
++ dic = pyphen.Pyphen(lang='nl_NL', left=4, right=4)
++ assert dic.inserted('lettergrepen') == 'letter-grepen'
++
++
++def test_filename():
++ """Test the ``filename`` parameter."""
++ dic = pyphen.Pyphen(filename=pyphen.LANGUAGES['nl_NL'])
++ assert dic.inserted('lettergrepen') == 'let-ter-gre-pen'
++
++
++def test_alternative():
++ """Test the alternative parser."""
++ dic = pyphen.Pyphen(lang='hu', left=1, right=1)
++ assert tuple(dic.iterate('kulissza')) == (
++ ('kulisz', 'sza'), ('ku', 'lissza'))
++ assert dic.inserted('kulissza') == 'ku-lisz-sza'
++
++
++def test_upper():
++ """Test uppercase."""
++ dic = pyphen.Pyphen(lang='nl_NL')
++ assert dic.inserted('LETTERGREPEN') == 'LET-TER-GRE-PEN'
++
++
++def test_upper_alternative():
++ """Test uppercase with alternative parser."""
++ dic = pyphen.Pyphen(lang='hu', left=1, right=1)
++ assert tuple(dic.iterate('KULISSZA')) == (
++ ('KULISZ', 'SZA'), ('KU', 'LISSZA'))
++ assert dic.inserted('KULISSZA') == 'KU-LISZ-SZA'
++
++
++def test_all_dictionaries():
++ """Test that all included dictionaries can be parsed."""
++ for lang in pyphen.LANGUAGES:
++ pyphen.Pyphen(lang=lang)
++
++
++def test_fallback():
++ """Test the language fallback algorithm."""
++ assert pyphen.language_fallback('en') == 'en'
++ assert pyphen.language_fallback('en_US') == 'en_US'
++ assert pyphen.language_fallback('en_FR') == 'en'
++ assert pyphen.language_fallback('en-Latn-US') == 'en_Latn_US'
++ assert pyphen.language_fallback('en-Cyrl-US') == 'en'
++ assert pyphen.language_fallback('fr-Latn-FR') == 'fr'
++ assert pyphen.language_fallback('en-US_variant1-x') == 'en_US'
diff --git a/debian/patches/0003-Disable-tests-needing-missing-fallback-data.patch b/debian/patches/0003-Disable-tests-needing-missing-fallback-data.patch
new file mode 100644
index 0000000..8329f61
--- /dev/null
+++ b/debian/patches/0003-Disable-tests-needing-missing-fallback-data.patch
@@ -0,0 +1,97 @@
+From: Scott Kitterman <scott@kitterman.com>
+Date: Fri, 4 Jan 2019 16:58:52 -0500
+Subject: Disable tests needing missing fallback data
+
+---
+ test.py | 60 ++++++++++++++++++++++++++++++++----------------------------
+ 1 file changed, 32 insertions(+), 28 deletions(-)
+
+diff --git a/test.py b/test.py
+index 858342d..540e79e 100644
+--- a/test.py
++++ b/test.py
+@@ -70,13 +70,14 @@ def test_missing_dict():
+ raise Exception('Importing a missing dict must raise a KeyError')
+
+
+-def test_personal_dict():
+- """Test a personal dict."""
+- dic = pyphen.Pyphen(lang='fr')
+- assert dic.inserted('autobandventieldopje') != 'au-to-band-ven-tiel-dop-je'
+- pyphen.LANGUAGES['fr'] = pyphen.LANGUAGES['nl_NL']
+- dic = pyphen.Pyphen(lang='fr')
+- assert dic.inserted('autobandventieldopje') == 'au-to-band-ven-tiel-dop-je'
++# Needs symlink in hyphen-fr to /usr/share/hyphen/hyph_fr
++#def test_personal_dict():
++ #"""Test a personal dict."""
++ #dic = pyphen.Pyphen(lang='fr')
++ #assert dic.inserted('autobandventieldopje') != 'au-to-band-ven-tiel-dop-je'
++ #pyphen.LANGUAGES['fr'] = pyphen.LANGUAGES['nl_NL']
++ #dic = pyphen.Pyphen(lang='fr')
++ #assert dic.inserted('autobandventieldopje') == 'au-to-band-ven-tiel-dop-je'
+
+
+ def test_left_right():
+@@ -97,12 +98,13 @@ def test_filename():
+ assert dic.inserted('lettergrepen') == 'let-ter-gre-pen'
+
+
+-def test_alternative():
+- """Test the alternative parser."""
+- dic = pyphen.Pyphen(lang='hu', left=1, right=1)
+- assert tuple(dic.iterate('kulissza')) == (
+- ('kulisz', 'sza'), ('ku', 'lissza'))
+- assert dic.inserted('kulissza') == 'ku-lisz-sza'
++# Needs symlink in hyphen-hu to /usr/share/hyphen/hyph_hu
++#def test_alternative():
++# """Test the alternative parser."""
++# dic = pyphen.Pyphen(lang='hu', left=1, right=1)
++# assert tuple(dic.iterate('kulissza')) == (
++# ('kulisz', 'sza'), ('ku', 'lissza'))
++# assert dic.inserted('kulissza') == 'ku-lisz-sza'
+
+
+ def test_upper():
+@@ -111,12 +113,13 @@ def test_upper():
+ assert dic.inserted('LETTERGREPEN') == 'LET-TER-GRE-PEN'
+
+
+-def test_upper_alternative():
+- """Test uppercase with alternative parser."""
+- dic = pyphen.Pyphen(lang='hu', left=1, right=1)
+- assert tuple(dic.iterate('KULISSZA')) == (
+- ('KULISZ', 'SZA'), ('KU', 'LISSZA'))
+- assert dic.inserted('KULISSZA') == 'KU-LISZ-SZA'
++# Needs symlink in hyphen-hu to /usr/share/hyphen/hyph_hu
++#def test_upper_alternative():
++# """Test uppercase with alternative parser."""
++# dic = pyphen.Pyphen(lang='hu', left=1, right=1)
++# assert tuple(dic.iterate('KULISSZA')) == (
++# ('KULISZ', 'SZA'), ('KU', 'LISSZA'))
++# assert dic.inserted('KULISSZA') == 'KU-LISZ-SZA'
+
+
+ def test_all_dictionaries():
+@@ -125,12 +128,13 @@ def test_all_dictionaries():
+ pyphen.Pyphen(lang=lang)
+
+
+-def test_fallback():
+- """Test the language fallback algorithm."""
+- assert pyphen.language_fallback('en') == 'en'
+- assert pyphen.language_fallback('en_US') == 'en_US'
+- assert pyphen.language_fallback('en_FR') == 'en'
+- assert pyphen.language_fallback('en-Latn-US') == 'en_Latn_US'
+- assert pyphen.language_fallback('en-Cyrl-US') == 'en'
+- assert pyphen.language_fallback('fr-Latn-FR') == 'fr'
+- assert pyphen.language_fallback('en-US_variant1-x') == 'en_US'
++# Needs symlinks added for en and fr
++#def test_fallback():
++ #"""Test the language fallback algorithm."""
++ #assert pyphen.language_fallback('en') == 'en'
++ #assert pyphen.language_fallback('en_US') == 'en_US'
++ #assert pyphen.language_fallback('en_FR') == 'en'
++ #assert pyphen.language_fallback('en-Latn-US') == 'en_Latn_US'
++ #assert pyphen.language_fallback('en-Cyrl-US') == 'en'
++ #assert pyphen.language_fallback('fr-Latn-FR') == 'fr'
++ #assert pyphen.language_fallback('en-US_variant1-x') == 'en_US'
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..53c364a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+0001-Use-system-hyphen-dictionaries.patch
+0002-Add-tests-from-github.patch
+0003-Disable-tests-needing-missing-fallback-data.patch
diff --git a/debian/python-pyphen.docs b/debian/python-pyphen.docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/debian/python-pyphen.docs
@@ -0,0 +1 @@
+README
diff --git a/debian/python3-pyphen.docs b/debian/python3-pyphen.docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/debian/python3-pyphen.docs
@@ -0,0 +1 @@
+README
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..c3b683d
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,24 @@
+#!/usr/bin/make -f
+
+export PYBUILD_NAME=pyphen
+buildvers := $(shell pyversions -sv)
+build3vers := $(shell py3versions -sv)
+
+%:
+ dh $@ --with python2,python3 --buildsystem=pybuild
+
+override_dh_auto_clean:
+ dh_auto_clean
+ rm -rf $(CURDIR)/.pytest
+
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ set -e && for i in $(buildvers); do \
+ echo "-- running tests for python"$$i" --" ; \
+ python$$i /usr/bin/py.test test.py;\
+ done
+ set -e && for i in $(build3vers); do \
+ echo "-- running tests for python"$$i" --" ; \
+ python$$i /usr/bin/py.test-3 test.py;\
+ done
+endif
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..a1ebf7f
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: py2 py3
+Depends: @, hyphen-nl, python, python-pytest, python3, python3-pytest
diff --git a/debian/tests/py2 b/debian/tests/py2
new file mode 100644
index 0000000..9f1b249
--- /dev/null
+++ b/debian/tests/py2
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+set -e && for i in $(pyversions -sv); do \
+ python$i /usr/bin/py.test test.py;\
+done
diff --git a/debian/tests/py3 b/debian/tests/py3
new file mode 100644
index 0000000..1c8cae5
--- /dev/null
+++ b/debian/tests/py3
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+set -e && for i in $(py3versions -sv); do \
+ python$i /usr/bin/py.test-3 test.py;\
+done
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..3e3710b
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+https://pypi.debian.net/Pyphen/Pyphen-([0-9][0-9t\.\-]*).tar.gz
+