dev-python/ukpostcodeparser: new package

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2020-04-25 00:44:15 +02:00
parent 22f26eda54
commit 5e90c0ac0f
4 changed files with 116 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST ukpostcodeparser-1.1.2.tar.gz 5585 BLAKE2B c95f215f0e4b222b85ec3ab0a8d82186845d9cb161098240411a425094ada391bb6c891904293cca4a56e9370217829b51ba30e91824dd3d762279baef6c65f7 SHA512 8113522b728c095f937a9f53f21c369130e3e63c4fc3546dbea4ad1c53648742fb0e766b1254c76ee65d69dec585f1a90caa7d39ca540de1765ff5f989a702de

View File

@@ -0,0 +1,70 @@
--- ../ukpostcodeparser/test/parser.py 2018-12-19 17:55:53.435338634 +0200
+++ ../ukpostcodeparser/test/parser.py 2018-12-19 17:56:54.075385419 +0200
@@ -796,14 +796,6 @@
expected=InvalidPostcodeError
)
- def test_091(self):
- self.run_parser(
- postcode='w1m 4zz',
- strict=True,
- incode_mandatory=False,
- expected=InvalidPostcodeError
- )
-
def test_092(self):
self.run_parser(
postcode='3r0',
@@ -844,22 +836,6 @@
expected=('GIR', '')
)
- def test_097(self):
- self.run_parser(
- postcode='w1m 4zz',
- strict=True,
- incode_mandatory=False,
- expected=InvalidPostcodeError
- )
-
- def test_098(self):
- self.run_parser(
- postcode='w1m',
- strict=True,
- incode_mandatory=False,
- expected=InvalidPostcodeError
- )
-
def test_099(self):
self.run_parser(
postcode='dn169aaA',
@@ -1068,14 +1044,6 @@
expected=InvalidPostcodeError
)
- def test_125(self):
- self.run_parser(
- postcode='w1m 4zz',
- strict=True,
- incode_mandatory=True,
- expected=InvalidPostcodeError
- )
-
def test_126(self):
self.run_parser(
postcode='3r0',
@@ -1116,14 +1084,6 @@
expected=IncodeNotFoundError
)
- def test_131(self):
- self.run_parser(
- postcode='w1m 4zz',
- strict=True,
- incode_mandatory=True,
- expected=InvalidPostcodeError
- )
-
def test_132(self):
self.run_parser(
postcode='w1m',

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
<longdescription lang="en">
UK Postcode parser
</longdescription>
<upstream>
<remote-id type="github">hamstah/ukpostcodeparser</remote-id>
<remote-id type="pypi">UkPostcodeParser</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,30 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( pypy3 python3_{6,7,8} )
inherit distutils-r1
DESCRIPTION="UK postcode parser library"
HOMEPAGE="https://github.com/hamstah/ukpostcodeparser"
SRC_URI="https://github.com/hamstah/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
# https://github.com/hamstah/ukpostcodeparser/issues/8
PATCHES=( "${FILESDIR}/${P}-test.patch" )
python_test() {
"${PYTHON}" -m unittest discover -v -s ukpostcodeparser/test -p parser.py || die "tests failed with ${EPYTHON}"
}
python_install_all() {
distutils-r1_python_install_all
find "${ED}" -type d -name "test" -exec rm -rv {} + || die "tests removing failed"
}