* [gentoo-commits] repo/proj/guru:dev commit in: dev-python/ukpostcodeparser/, dev-python/ukpostcodeparser/files/
@ 2020-04-25 0:37 Alessandro Barbieri
0 siblings, 0 replies; only message in thread
From: Alessandro Barbieri @ 2020-04-25 0:37 UTC (permalink / raw
To: gentoo-commits
commit: 5e90c0ac0f421d3163faab593c367cce6b4602cb
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Fri Apr 24 22:44:15 2020 +0000
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sat Apr 25 00:37:16 2020 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5e90c0ac
dev-python/ukpostcodeparser: new package
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
dev-python/ukpostcodeparser/Manifest | 1 +
.../files/ukpostcodeparser-1.1.2-test.patch | 70 ++++++++++++++++++++++
dev-python/ukpostcodeparser/metadata.xml | 15 +++++
.../ukpostcodeparser/ukpostcodeparser-1.1.2.ebuild | 30 ++++++++++
4 files changed, 116 insertions(+)
diff --git a/dev-python/ukpostcodeparser/Manifest b/dev-python/ukpostcodeparser/Manifest
new file mode 100644
index 0000000..12535d7
--- /dev/null
+++ b/dev-python/ukpostcodeparser/Manifest
@@ -0,0 +1 @@
+DIST ukpostcodeparser-1.1.2.tar.gz 5585 BLAKE2B c95f215f0e4b222b85ec3ab0a8d82186845d9cb161098240411a425094ada391bb6c891904293cca4a56e9370217829b51ba30e91824dd3d762279baef6c65f7 SHA512 8113522b728c095f937a9f53f21c369130e3e63c4fc3546dbea4ad1c53648742fb0e766b1254c76ee65d69dec585f1a90caa7d39ca540de1765ff5f989a702de
diff --git a/dev-python/ukpostcodeparser/files/ukpostcodeparser-1.1.2-test.patch b/dev-python/ukpostcodeparser/files/ukpostcodeparser-1.1.2-test.patch
new file mode 100644
index 0000000..fd08a55
--- /dev/null
+++ b/dev-python/ukpostcodeparser/files/ukpostcodeparser-1.1.2-test.patch
@@ -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',
diff --git a/dev-python/ukpostcodeparser/metadata.xml b/dev-python/ukpostcodeparser/metadata.xml
new file mode 100644
index 0000000..f34e585
--- /dev/null
+++ b/dev-python/ukpostcodeparser/metadata.xml
@@ -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>
diff --git a/dev-python/ukpostcodeparser/ukpostcodeparser-1.1.2.ebuild b/dev-python/ukpostcodeparser/ukpostcodeparser-1.1.2.ebuild
new file mode 100644
index 0000000..0469203
--- /dev/null
+++ b/dev-python/ukpostcodeparser/ukpostcodeparser-1.1.2.ebuild
@@ -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"
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-25 0:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-25 0:37 [gentoo-commits] repo/proj/guru:dev commit in: dev-python/ukpostcodeparser/, dev-python/ukpostcodeparser/files/ Alessandro Barbieri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox