From e0365e817868827f1b225291b0ff152657af144f Mon Sep 17 00:00:00 2001 From: Scott Kitterman Date: Sat, 5 Jan 2019 09:16:42 +0100 Subject: [PATCH] Import pyphen_0.9.5-2.debian.tar.xz [dgit import tarball pyphen 0.9.5-2 pyphen_0.9.5-2.debian.tar.xz] --- changelog | 24 +++ compat | 1 + control | 45 +++++ copyright | 161 ++++++++++++++++++ gbp.conf | 2 + .../0001-Use-system-hyphen-dictionaries.patch | 37 ++++ patches/0002-Add-tests-from-github.patch | 151 ++++++++++++++++ ...-tests-needing-missing-fallback-data.patch | 97 +++++++++++ patches/series | 3 + python-pyphen.docs | 1 + python3-pyphen.docs | 1 + rules | 24 +++ source/format | 1 + tests/control | 2 + tests/py2 | 5 + tests/py3 | 5 + watch | 3 + 17 files changed, 563 insertions(+) create mode 100644 changelog create mode 100644 compat create mode 100644 control create mode 100644 copyright create mode 100644 gbp.conf create mode 100644 patches/0001-Use-system-hyphen-dictionaries.patch create mode 100644 patches/0002-Add-tests-from-github.patch create mode 100644 patches/0003-Disable-tests-needing-missing-fallback-data.patch create mode 100644 patches/series create mode 100644 python-pyphen.docs create mode 100644 python3-pyphen.docs create mode 100755 rules create mode 100644 source/format create mode 100644 tests/control create mode 100644 tests/py2 create mode 100644 tests/py3 create mode 100644 watch diff --git a/changelog b/changelog new file mode 100644 index 0000000..3d2bc07 --- /dev/null +++ b/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 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 Fri, 04 Jan 2019 18:27:12 -0500 diff --git a/compat b/compat new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/compat @@ -0,0 +1 @@ +11 diff --git a/control b/control new file mode 100644 index 0000000..0e5a2b2 --- /dev/null +++ b/control @@ -0,0 +1,45 @@ +Source: pyphen +Section: python +Priority: optional +Maintainer: Debian Python Modules Team +Uploaders: Scott Kitterman , + Daniel Kahn Gillmor +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/copyright b/copyright new file mode 100644 index 0000000..54a5ad8 --- /dev/null +++ b/copyright @@ -0,0 +1,161 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Pyphen +Upstream-Contact: Guillaume Ayoub +Source: https://github.com/Kozea/Pyphen + +Files: * +Copyright: Copyright 2008 - Wilbert Berendsen , + 2012-2013 - Guillaume Ayoub +License: GPL-2+/LGPL-2.1+/MPL-1.1 + +Files: debian/* +Copyright: 2019 Scott Kitterman +License: GPL-2+/LGPL-2.1+/MPL-1.1 + +Files: pyphen/dictionaries/hyph_hu*.dic +Copyright: Copyright (C) 2003 Nagy Bence +License: GPL-2+/LGPL-2.1+/MPL-1.1 + +Files: pyphen/dictionaries/hyph_de*.dic +Copyright: Marco Huggenberger , Daniel Naber + , Karl Zeiler +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 + +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 . + . + 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/gbp.conf b/gbp.conf new file mode 100644 index 0000000..3879982 --- /dev/null +++ b/gbp.conf @@ -0,0 +1,2 @@ +[DEFAULT] +debian-branch=debian/master diff --git a/patches/0001-Use-system-hyphen-dictionaries.patch b/patches/0001-Use-system-hyphen-dictionaries.patch new file mode 100644 index 0000000..152e2d8 --- /dev/null +++ b/patches/0001-Use-system-hyphen-dictionaries.patch @@ -0,0 +1,37 @@ +From: Scott Kitterman +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/patches/0002-Add-tests-from-github.patch b/patches/0002-Add-tests-from-github.patch new file mode 100644 index 0000000..a72eae6 --- /dev/null +++ b/patches/0002-Add-tests-from-github.patch @@ -0,0 +1,151 @@ +From: Scott Kitterman +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 ++# ++# 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 . ++ ++""" ++ ++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/patches/0003-Disable-tests-needing-missing-fallback-data.patch b/patches/0003-Disable-tests-needing-missing-fallback-data.patch new file mode 100644 index 0000000..8329f61 --- /dev/null +++ b/patches/0003-Disable-tests-needing-missing-fallback-data.patch @@ -0,0 +1,97 @@ +From: Scott Kitterman +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/patches/series b/patches/series new file mode 100644 index 0000000..53c364a --- /dev/null +++ b/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/python-pyphen.docs b/python-pyphen.docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/python-pyphen.docs @@ -0,0 +1 @@ +README diff --git a/python3-pyphen.docs b/python3-pyphen.docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/python3-pyphen.docs @@ -0,0 +1 @@ +README diff --git a/rules b/rules new file mode 100755 index 0000000..c3b683d --- /dev/null +++ b/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/source/format b/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/tests/control b/tests/control new file mode 100644 index 0000000..a1ebf7f --- /dev/null +++ b/tests/control @@ -0,0 +1,2 @@ +Tests: py2 py3 +Depends: @, hyphen-nl, python, python-pytest, python3, python3-pytest diff --git a/tests/py2 b/tests/py2 new file mode 100644 index 0000000..9f1b249 --- /dev/null +++ b/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/tests/py3 b/tests/py3 new file mode 100644 index 0000000..1c8cae5 --- /dev/null +++ b/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/watch b/watch new file mode 100644 index 0000000..3e3710b --- /dev/null +++ b/watch @@ -0,0 +1,3 @@ +version=3 +https://pypi.debian.net/Pyphen/Pyphen-([0-9][0-9t\.\-]*).tar.gz +