1 |
commit: 5e90c0ac0f421d3163faab593c367cce6b4602cb |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Apr 24 22:44:15 2020 +0000 |
4 |
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
5 |
CommitDate: Sat Apr 25 00:37:16 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5e90c0ac |
7 |
|
8 |
dev-python/ukpostcodeparser: new package |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
12 |
|
13 |
dev-python/ukpostcodeparser/Manifest | 1 + |
14 |
.../files/ukpostcodeparser-1.1.2-test.patch | 70 ++++++++++++++++++++++ |
15 |
dev-python/ukpostcodeparser/metadata.xml | 15 +++++ |
16 |
.../ukpostcodeparser/ukpostcodeparser-1.1.2.ebuild | 30 ++++++++++ |
17 |
4 files changed, 116 insertions(+) |
18 |
|
19 |
diff --git a/dev-python/ukpostcodeparser/Manifest b/dev-python/ukpostcodeparser/Manifest |
20 |
new file mode 100644 |
21 |
index 0000000..12535d7 |
22 |
--- /dev/null |
23 |
+++ b/dev-python/ukpostcodeparser/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST ukpostcodeparser-1.1.2.tar.gz 5585 BLAKE2B c95f215f0e4b222b85ec3ab0a8d82186845d9cb161098240411a425094ada391bb6c891904293cca4a56e9370217829b51ba30e91824dd3d762279baef6c65f7 SHA512 8113522b728c095f937a9f53f21c369130e3e63c4fc3546dbea4ad1c53648742fb0e766b1254c76ee65d69dec585f1a90caa7d39ca540de1765ff5f989a702de |
26 |
|
27 |
diff --git a/dev-python/ukpostcodeparser/files/ukpostcodeparser-1.1.2-test.patch b/dev-python/ukpostcodeparser/files/ukpostcodeparser-1.1.2-test.patch |
28 |
new file mode 100644 |
29 |
index 0000000..fd08a55 |
30 |
--- /dev/null |
31 |
+++ b/dev-python/ukpostcodeparser/files/ukpostcodeparser-1.1.2-test.patch |
32 |
@@ -0,0 +1,70 @@ |
33 |
+--- ../ukpostcodeparser/test/parser.py 2018-12-19 17:55:53.435338634 +0200 |
34 |
++++ ../ukpostcodeparser/test/parser.py 2018-12-19 17:56:54.075385419 +0200 |
35 |
+@@ -796,14 +796,6 @@ |
36 |
+ expected=InvalidPostcodeError |
37 |
+ ) |
38 |
+ |
39 |
+- def test_091(self): |
40 |
+- self.run_parser( |
41 |
+- postcode='w1m 4zz', |
42 |
+- strict=True, |
43 |
+- incode_mandatory=False, |
44 |
+- expected=InvalidPostcodeError |
45 |
+- ) |
46 |
+- |
47 |
+ def test_092(self): |
48 |
+ self.run_parser( |
49 |
+ postcode='3r0', |
50 |
+@@ -844,22 +836,6 @@ |
51 |
+ expected=('GIR', '') |
52 |
+ ) |
53 |
+ |
54 |
+- def test_097(self): |
55 |
+- self.run_parser( |
56 |
+- postcode='w1m 4zz', |
57 |
+- strict=True, |
58 |
+- incode_mandatory=False, |
59 |
+- expected=InvalidPostcodeError |
60 |
+- ) |
61 |
+- |
62 |
+- def test_098(self): |
63 |
+- self.run_parser( |
64 |
+- postcode='w1m', |
65 |
+- strict=True, |
66 |
+- incode_mandatory=False, |
67 |
+- expected=InvalidPostcodeError |
68 |
+- ) |
69 |
+- |
70 |
+ def test_099(self): |
71 |
+ self.run_parser( |
72 |
+ postcode='dn169aaA', |
73 |
+@@ -1068,14 +1044,6 @@ |
74 |
+ expected=InvalidPostcodeError |
75 |
+ ) |
76 |
+ |
77 |
+- def test_125(self): |
78 |
+- self.run_parser( |
79 |
+- postcode='w1m 4zz', |
80 |
+- strict=True, |
81 |
+- incode_mandatory=True, |
82 |
+- expected=InvalidPostcodeError |
83 |
+- ) |
84 |
+- |
85 |
+ def test_126(self): |
86 |
+ self.run_parser( |
87 |
+ postcode='3r0', |
88 |
+@@ -1116,14 +1084,6 @@ |
89 |
+ expected=IncodeNotFoundError |
90 |
+ ) |
91 |
+ |
92 |
+- def test_131(self): |
93 |
+- self.run_parser( |
94 |
+- postcode='w1m 4zz', |
95 |
+- strict=True, |
96 |
+- incode_mandatory=True, |
97 |
+- expected=InvalidPostcodeError |
98 |
+- ) |
99 |
+- |
100 |
+ def test_132(self): |
101 |
+ self.run_parser( |
102 |
+ postcode='w1m', |
103 |
|
104 |
diff --git a/dev-python/ukpostcodeparser/metadata.xml b/dev-python/ukpostcodeparser/metadata.xml |
105 |
new file mode 100644 |
106 |
index 0000000..f34e585 |
107 |
--- /dev/null |
108 |
+++ b/dev-python/ukpostcodeparser/metadata.xml |
109 |
@@ -0,0 +1,15 @@ |
110 |
+<?xml version="1.0" encoding="UTF-8"?> |
111 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
112 |
+<pkgmetadata> |
113 |
+ <maintainer type="person"> |
114 |
+ <email>lssndrbarbieri@×××××.com</email> |
115 |
+ <name>Alessandro Barbieri</name> |
116 |
+ </maintainer> |
117 |
+ <longdescription lang="en"> |
118 |
+ UK Postcode parser |
119 |
+ </longdescription> |
120 |
+ <upstream> |
121 |
+ <remote-id type="github">hamstah/ukpostcodeparser</remote-id> |
122 |
+ <remote-id type="pypi">UkPostcodeParser</remote-id> |
123 |
+ </upstream> |
124 |
+</pkgmetadata> |
125 |
|
126 |
diff --git a/dev-python/ukpostcodeparser/ukpostcodeparser-1.1.2.ebuild b/dev-python/ukpostcodeparser/ukpostcodeparser-1.1.2.ebuild |
127 |
new file mode 100644 |
128 |
index 0000000..0469203 |
129 |
--- /dev/null |
130 |
+++ b/dev-python/ukpostcodeparser/ukpostcodeparser-1.1.2.ebuild |
131 |
@@ -0,0 +1,30 @@ |
132 |
+# Copyright 1999-2020 Gentoo Authors |
133 |
+# Distributed under the terms of the GNU General Public License v2 |
134 |
+ |
135 |
+EAPI="7" |
136 |
+ |
137 |
+PYTHON_COMPAT=( pypy3 python3_{6,7,8} ) |
138 |
+ |
139 |
+inherit distutils-r1 |
140 |
+ |
141 |
+DESCRIPTION="UK postcode parser library" |
142 |
+HOMEPAGE="https://github.com/hamstah/ukpostcodeparser" |
143 |
+SRC_URI="https://github.com/hamstah/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
144 |
+ |
145 |
+LICENSE="MIT" |
146 |
+SLOT="0" |
147 |
+KEYWORDS="~amd64 ~x86" |
148 |
+IUSE="test" |
149 |
+RESTRICT="!test? ( test )" |
150 |
+ |
151 |
+# https://github.com/hamstah/ukpostcodeparser/issues/8 |
152 |
+PATCHES=( "${FILESDIR}/${P}-test.patch" ) |
153 |
+ |
154 |
+python_test() { |
155 |
+ "${PYTHON}" -m unittest discover -v -s ukpostcodeparser/test -p parser.py || die "tests failed with ${EPYTHON}" |
156 |
+} |
157 |
+ |
158 |
+python_install_all() { |
159 |
+ distutils-r1_python_install_all |
160 |
+ find "${ED}" -type d -name "test" -exec rm -rv {} + || die "tests removing failed" |
161 |
+} |