1 |
commit: 22b1f40c44e0871fdfae2083dc688f571de97153 |
2 |
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 4 22:21:06 2020 +0000 |
4 |
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 4 22:22:52 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22b1f40c |
7 |
|
8 |
dev-python/svgwrite: 1.3.1 + py38 + QA fixes |
9 |
|
10 |
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
12 |
|
13 |
dev-python/svgwrite/Manifest | 1 + |
14 |
.../files/svgwrite-1.3.1-fix-tests-py38.patch | 39 ++++++++++++++++++++++ |
15 |
dev-python/svgwrite/svgwrite-1.3.1.ebuild | 27 +++++++++++++++ |
16 |
3 files changed, 67 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/svgwrite/Manifest b/dev-python/svgwrite/Manifest |
19 |
index a084815d741..6eb806cc05f 100644 |
20 |
--- a/dev-python/svgwrite/Manifest |
21 |
+++ b/dev-python/svgwrite/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST svgwrite-1.1.12.tar.gz 202920 BLAKE2B a2b60f3c3829203342919bc75d01f64515f13ba305f357fa788c3754679451e21a7ab97eb517413d4e882e7271d063e7034a10bb70a1946d84734e23e838bdd1 SHA512 326fcc0dd0749925c0c35793a91ffdb25be1fd724d7d87bd6491a6396a6ab65fce073a387faac4f3d034ceadcf24ef73e3838cd249c4e1c19e20b1e82769cf1a |
24 |
DIST svgwrite-1.2.1.tar.gz 207371 BLAKE2B 8d6198dbfbc9230eb1592651bde3daaf3f14570aa57fb5b0a3e0989b36b76181bfeac9ee96ee7dcf0ad6e53d1e4ec7035e66d2d1f45ef92de59fa0305f391923 SHA512 8874a25ce5418dc86b0f7034555aca46619c415ec6c51243d713f168f9255ddec8d17ecde13cbfe1a4ffcfbad5b160db62d226b5b0106725dd263763d43abdc2 |
25 |
+DIST svgwrite-1.3.1.tar.gz 249712 BLAKE2B 3f03f841d4e1bdf3e8d3d47c86301bcc22f205d71d265902f0ccb5a78710815521f34589ce261a463d7e80c6eeaac60d2090895ae1157ab6f20c0f5c21f5e2e2 SHA512 a4d2db34194923055c6e92c0af5540eef767cf8481d7c991b357f5bc77fd1874bba65220e7a7ff3a4da4bd30a49663b6ac514adb2b41cb4b087a7bb64053ac0a |
26 |
|
27 |
diff --git a/dev-python/svgwrite/files/svgwrite-1.3.1-fix-tests-py38.patch b/dev-python/svgwrite/files/svgwrite-1.3.1-fix-tests-py38.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..872a113a2a3 |
30 |
--- /dev/null |
31 |
+++ b/dev-python/svgwrite/files/svgwrite-1.3.1-fix-tests-py38.patch |
32 |
@@ -0,0 +1,39 @@ |
33 |
+From 36ec11ccf3275c6ab9156625d322def9c324e090 Mon Sep 17 00:00:00 2001 |
34 |
+From: mozman <me@××××××.at> |
35 |
+Date: Wed, 6 Nov 2019 05:24:45 +0100 |
36 |
+Subject: [PATCH] ignore svg tag at pretty print testing |
37 |
+ |
38 |
+Order of svg attribute of the svg tag has changed in Python 3.8, |
39 |
+ignoring this tag is the easiest way to solve this problem. |
40 |
+--- |
41 |
+ tests/test_pretty_xml.py | 3 ++- |
42 |
+ tox.ini | 2 +- |
43 |
+ 2 files changed, 3 insertions(+), 2 deletions(-) |
44 |
+ |
45 |
+diff --git a/tests/test_pretty_xml.py b/tests/test_pretty_xml.py |
46 |
+index c004626..14a826e 100644 |
47 |
+--- a/tests/test_pretty_xml.py |
48 |
++++ b/tests/test_pretty_xml.py |
49 |
+@@ -16,7 +16,8 @@ class TestPrettyXML(unittest.TestCase): |
50 |
+ def test_pretty_print(self): |
51 |
+ result = pretty_xml(XML_UGLY).split('\n') |
52 |
+ expect = XML_PRETTY.split('\n') |
53 |
+- for e, r in zip(expect, result): |
54 |
++ # skip svg tag, order of attributes changes often by new Python releases |
55 |
++ for e, r in zip(expect[1:], result[1:]): |
56 |
+ self.assertEqual(e, r) |
57 |
+ |
58 |
+ def test_empty_string(self): |
59 |
+diff --git a/tox.ini b/tox.ini |
60 |
+index 55de9ce..fe450be 100644 |
61 |
+--- a/tox.ini |
62 |
++++ b/tox.ini |
63 |
+@@ -4,7 +4,7 @@ |
64 |
+ # and then run "tox" from this directory. |
65 |
+ |
66 |
+ [tox] |
67 |
+-envlist = py36, py37, pypy |
68 |
++envlist = py36, py37, py38, pypy |
69 |
+ |
70 |
+ [testenv] |
71 |
+ commands = pytest tests |
72 |
|
73 |
diff --git a/dev-python/svgwrite/svgwrite-1.3.1.ebuild b/dev-python/svgwrite/svgwrite-1.3.1.ebuild |
74 |
new file mode 100644 |
75 |
index 00000000000..77b8babdc57 |
76 |
--- /dev/null |
77 |
+++ b/dev-python/svgwrite/svgwrite-1.3.1.ebuild |
78 |
@@ -0,0 +1,27 @@ |
79 |
+# Copyright 1999-2020 Gentoo Authors |
80 |
+# Distributed under the terms of the GNU General Public License v2 |
81 |
+ |
82 |
+EAPI=7 |
83 |
+ |
84 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
85 |
+inherit distutils-r1 |
86 |
+ |
87 |
+DESCRIPTION="Python Package to write SVG files" |
88 |
+HOMEPAGE="https://github.com/mozman/svgwrite" |
89 |
+SRC_URI="https://github.com/mozman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
90 |
+ |
91 |
+LICENSE="MIT" |
92 |
+SLOT="0" |
93 |
+KEYWORDS="~amd64 ~x86" |
94 |
+IUSE="test" |
95 |
+RESTRICT="!test? ( test )" |
96 |
+ |
97 |
+RDEPEND=">=dev-python/pyparsing-2.0.1[${PYTHON_USEDEP}]" |
98 |
+DEPEND="${RDEPEND} |
99 |
+ test? ( dev-python/pytest[${PYTHON_USEDEP}] )" |
100 |
+ |
101 |
+PATCHES=( |
102 |
+ "${FILESDIR}"/${P}-fix-tests-py38.patch |
103 |
+) |
104 |
+ |
105 |
+distutils_enable_tests pytest |