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 [dgit import unpatched python-num2words 0.5.9-1]
This commit is contained in:
commit
a8944de077
|
@ -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 <raphael@freexian.com> Tue, 19 Jan 2021 16:16:13 +0100
|
||||
|
||||
python-num2words (0.5.6-1) unstable; urgency=medium
|
||||
|
||||
* Initial release (Closes: #891905)
|
||||
|
||||
-- Sophie Brun <sophie@freexian.com> Tue, 10 Apr 2018 18:05:40 +0200
|
|
@ -0,0 +1,22 @@
|
|||
Source: python-num2words
|
||||
Section: python
|
||||
Priority: optional
|
||||
Maintainer: Debian Python Team <team+python@tracker.debian.org>
|
||||
Uploaders: Sophie Brun <sophie@freexian.com>
|
||||
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.
|
|
@ -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 <sophie@freexian.com>
|
||||
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 <https://www.gnu.org/licenses/>
|
||||
.
|
||||
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".
|
|
@ -0,0 +1,2 @@
|
|||
[DEFAULT]
|
||||
debian-branch=debian/master
|
137
debian/patches/Disable-CLI-tests-as-we-don-t-have-python3-delegator-in-D.patch
vendored
Normal file
137
debian/patches/Disable-CLI-tests-as-we-don-t-have-python3-delegator-in-D.patch
vendored
Normal file
|
@ -0,0 +1,137 @@
|
|||
From: =?utf-8?q?Rapha=C3=ABl_Hertzog?= <raphael@freexian.com>
|
||||
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"
|
||||
- )
|
|
@ -0,0 +1 @@
|
|||
Disable-CLI-tests-as-we-don-t-have-python3-delegator-in-D.patch
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/make -f
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
export PYBUILD_NAME=num2words
|
||||
|
||||
%:
|
||||
dh $@ --with python3 --buildsystem=pybuild
|
|
@ -0,0 +1 @@
|
|||
3.0 (quilt)
|
|
@ -0,0 +1 @@
|
|||
extend-diff-ignore = "^[^/]*[.]egg-info/"
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue