From 3098081765671c9f1a9b144596afc227ed878da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= Date: Tue, 19 Jan 2021 16:16:13 +0100 Subject: [PATCH] Import python-num2words_0.5.9-1.debian.tar.xz [dgit import tarball python-num2words 0.5.9-1 python-num2words_0.5.9-1.debian.tar.xz] --- changelog | 31 ++++ control | 22 +++ copyright | 32 ++++ gbp.conf | 2 + ...we-don-t-have-python3-delegator-in-D.patch | 137 ++++++++++++++++++ patches/series | 1 + rules | 7 + source/format | 1 + source/options | 1 + upstream/metadata | 4 + watch | 3 + 11 files changed, 241 insertions(+) create mode 100644 changelog create mode 100644 control create mode 100644 copyright create mode 100644 gbp.conf create mode 100644 patches/Disable-CLI-tests-as-we-don-t-have-python3-delegator-in-D.patch create mode 100644 patches/series create mode 100755 rules create mode 100644 source/format create mode 100644 source/options create mode 100644 upstream/metadata create mode 100644 watch diff --git a/changelog b/changelog new file mode 100644 index 0000000..e6b7930 --- /dev/null +++ b/changelog @@ -0,0 +1,31 @@ +python-num2words (0.5.9-1) unstable; urgency=medium + + * Team upload. + + [ Ondřej Nový ] + * d/control: Remove ancient X-Python3-Version field + * Use debhelper-compat instead of debian/compat. + * d/control: Update Maintainer field with new Debian Python Team + contact address. + * d/control: Update Vcs-* fields with new Debian Python Team Salsa + layout. + + [ Debian Janitor ] + * debian/copyright: use spaces rather than tabs to start continuation + lines. + * Bump debhelper from old 11 to 12. + * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository, + Repository-Browse. + + [ Raphaël Hertzog ] + * New upstream version 0.5.9 + * Add python3-docopt to Build-Depends + * Disable CLI tests as we don't have python3-delegator in Debian + + -- Raphaël Hertzog Tue, 19 Jan 2021 16:16:13 +0100 + +python-num2words (0.5.6-1) unstable; urgency=medium + + * Initial release (Closes: #891905) + + -- Sophie Brun Tue, 10 Apr 2018 18:05:40 +0200 diff --git a/control b/control new file mode 100644 index 0000000..ba141de --- /dev/null +++ b/control @@ -0,0 +1,22 @@ +Source: python-num2words +Section: python +Priority: optional +Maintainer: Debian Python Team +Uploaders: Sophie Brun +Build-Depends: debhelper-compat (= 12), dh-python, python3-all, python3-setuptools, python3-docopt +Standards-Version: 4.1.4 +Homepage: https://github.com/savoirfairelinux/num2words +Vcs-Git: https://salsa.debian.org/python-team/packages/python-num2words.git +Vcs-Browser: https://salsa.debian.org/python-team/packages/python-num2words +Testsuite: autopkgtest-pkg-python + +Package: python3-num2words +Architecture: all +Depends: ${python3:Depends}, ${misc:Depends} +Description: Convert numbers to words in multiple languages (Python 3) + This package contains a Python library that converts numbers like ``42`` to + words like ``forty-two``. It supports multiple languages and can even + generate ordinal numbers like ``forty-second`` (although this last feature is + a bit buggy for some languages at the moment). + . + This package installs the library for Python 3. diff --git a/copyright b/copyright new file mode 100644 index 0000000..ab2614d --- /dev/null +++ b/copyright @@ -0,0 +1,32 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: num2words +Source: https://pypi.python.org/pypi/num2words + +Files: * +Copyright: 2013-2015 Savoir-faire Linux inc. + 2017 Tufan Kaynak, Framras + 2015 Blaz Bregar + 2003 Taro Ogawa +License: LGPL-2.1+ + +Files: debian/* +Copyright: 2018 Sophie Brun +License: LGPL-2.1+ + +License: LGPL-2.1+ + This package 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 package 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 program. If not, see + . + On Debian systems, the complete text of the GNU Lesser General + Public License version 2.1 can be found in + "/usr/share/common-licenses/LGPL-2.1". 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/Disable-CLI-tests-as-we-don-t-have-python3-delegator-in-D.patch b/patches/Disable-CLI-tests-as-we-don-t-have-python3-delegator-in-D.patch new file mode 100644 index 0000000..b7608f5 --- /dev/null +++ b/patches/Disable-CLI-tests-as-we-don-t-have-python3-delegator-in-D.patch @@ -0,0 +1,137 @@ +From: =?utf-8?q?Rapha=C3=ABl_Hertzog?= +Date: Tue, 19 Jan 2021 16:26:29 +0100 +Subject: Disable CLI tests as we don't have python3-delegator in Debian + +--- + setup.py | 1 - + tests/test_cli.py | 111 ------------------------------------------------------ + 2 files changed, 112 deletions(-) + delete mode 100644 tests/test_cli.py + +diff --git a/setup.py b/setup.py +index fbc34f7..a830169 100644 +--- a/setup.py ++++ b/setup.py +@@ -75,5 +75,4 @@ setup( + classifiers=CLASSIFIERS, + scripts=['bin/num2words'], + install_requires=["docopt>=0.6.2"], +- tests_require=['delegator.py'], + ) +diff --git a/tests/test_cli.py b/tests/test_cli.py +deleted file mode 100644 +index 484a8dc..0000000 +--- a/tests/test_cli.py ++++ /dev/null +@@ -1,111 +0,0 @@ +-#!/usr/bin/env python +-# -*- coding: utf-8 -*- +-# Copyright (c) 2003, Taro Ogawa. All Rights Reserved. +-# Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved. +- +-# 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 +- +-from __future__ import unicode_literals +- +-import os +-import unittest +- +-import delegator +-import num2words +- +- +-class CliCaller(object): +- +- def __init__(self): +- self.cmd = os.path.realpath(os.path.join(os.path.dirname(__file__), +- "..", "bin", "num2words")) +- self.cmd_list = ["python", self.cmd] +- +- def run_cmd(self, *args): +- cmd_list = self.cmd_list + [str(arg) for arg in args] +- cmd = " ".join(cmd_list) +- return delegator.run(cmd) +- +- +-class CliTestCase(unittest.TestCase): +- """Test the command line app""" +- +- def setUp(self): +- self.cli = CliCaller() +- +- def test_cli_help(self): +- """num2words without arguments should exit with status 1 +- and show docopt's default short usage message +- """ +- output = self.cli.run_cmd() +- self.assertEqual(output.return_code, 1) +- self.assertTrue(output.err.startswith('Usage:')) +- +- def test_cli_list_langs(self): +- """You should be able to list all availabe languages +- """ +- output = self.cli.run_cmd('--list-languages') +- self.assertEqual( +- sorted(list(num2words.CONVERTER_CLASSES.keys())), +- output.out.strip().split(os.linesep) +- ) +- output = self.cli.run_cmd('-L') +- self.assertEqual( +- sorted(list(num2words.CONVERTER_CLASSES.keys())), +- output.out.strip().split(os.linesep) +- ) +- +- def test_cli_list_converters(self): +- """You should be able to list all available converters +- """ +- output = self.cli.run_cmd('--list-converters') +- self.assertEqual( +- sorted(list(num2words.CONVERTES_TYPES)), +- output.out.strip().split(os.linesep) +- ) +- output = self.cli.run_cmd('-C') +- self.assertEqual( +- sorted(list(num2words.CONVERTES_TYPES)), +- output.out.strip().split(os.linesep) +- ) +- +- def test_cli_default_lang(self): +- """Default to english +- """ +- output = self.cli.run_cmd(150) +- self.assertEqual(output.return_code, 0) +- self.assertEqual( +- output.out.strip(), +- "one hundred and fifty point zero" +- ) +- +- def test_cli_with_lang(self): +- """You should be able to specify a language +- """ +- output = self.cli.run_cmd(150, '--lang', 'es') +- self.assertEqual(output.return_code, 0) +- self.assertEqual( +- output.out.strip(), +- "ciento cincuenta punto cero" +- ) +- +- def test_cli_with_lang_to(self): +- """You should be able to specify a language +- """ +- output = self.cli.run_cmd(150.55, '--lang', 'es', '--to', 'currency') +- self.assertEqual(output.return_code, 0) +- self.assertEqual( +- output.out.strip(), +- "ciento cincuenta euros con cincuenta y cinco centimos" +- ) diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..745190c --- /dev/null +++ b/patches/series @@ -0,0 +1 @@ +Disable-CLI-tests-as-we-don-t-have-python3-delegator-in-D.patch diff --git a/rules b/rules new file mode 100755 index 0000000..dc9de7b --- /dev/null +++ b/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f +#export DH_VERBOSE = 1 + +export PYBUILD_NAME=num2words + +%: + dh $@ --with python3 --buildsystem=pybuild 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/source/options b/source/options new file mode 100644 index 0000000..cb61fa5 --- /dev/null +++ b/source/options @@ -0,0 +1 @@ +extend-diff-ignore = "^[^/]*[.]egg-info/" diff --git a/upstream/metadata b/upstream/metadata new file mode 100644 index 0000000..1d91dbc --- /dev/null +++ b/upstream/metadata @@ -0,0 +1,4 @@ +Bug-Database: https://github.com/savoirfairelinux/num2words/issues +Bug-Submit: https://github.com/savoirfairelinux/num2words/issues/new +Repository: https://github.com/savoirfairelinux/num2words.git +Repository-Browse: https://github.com/savoirfairelinux/num2words diff --git a/watch b/watch new file mode 100644 index 0000000..469db29 --- /dev/null +++ b/watch @@ -0,0 +1,3 @@ +version=4 +opts="filenamemangle=s/.*\/(\d.*)\.tar\.gz/python-num2words-$1.tar.gz/" \ +https://github.com/savoirfairelinux/num2words/tags .*/(\d.*)\.tar\.gz