Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pydot/files/, dev-python/pydot/
Date: Mon, 24 Jan 2022 20:08:53
Message-Id: 1643054919.48e07ea8abd7fe63bf7c276eae7ffa956f9f64b6.sam@gentoo
1 commit: 48e07ea8abd7fe63bf7c276eae7ffa956f9f64b6
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 24 20:08:30 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 24 20:08:39 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48e07ea8
7
8 dev-python/pydot: workaround pyparsing-3 issue
9
10 Closes: https://bugs.gentoo.org/830676
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../pydot/files/pydot-1.4.2-pyparsing-3.patch | 22 +++++++++++++
14 dev-python/pydot/pydot-1.4.2-r2.ebuild | 36 ++++++++++++++++++++++
15 2 files changed, 58 insertions(+)
16
17 diff --git a/dev-python/pydot/files/pydot-1.4.2-pyparsing-3.patch b/dev-python/pydot/files/pydot-1.4.2-pyparsing-3.patch
18 new file mode 100644
19 index 000000000000..09d4c654ac17
20 --- /dev/null
21 +++ b/dev-python/pydot/files/pydot-1.4.2-pyparsing-3.patch
22 @@ -0,0 +1,22 @@
23 +https://github.com/pydot/pydot/pull/281
24 +https://bugs.gentoo.org/830676
25 +
26 +(rebased)
27 +
28 +From 4ab2c033c0dd67cab87be9a9392c558359caf80c Mon Sep 17 00:00:00 2001
29 +From: Anton Bolshakov <blshkv@××××××××××××××××××××.com>
30 +Date: Tue, 4 Jan 2022 16:05:51 +0800
31 +Subject: [PATCH] Update dot_parser.py
32 +
33 +https://github.com/pydot/pydot/issues/277
34 +--- a/dot_parser.py
35 ++++ b/dot_parser.py
36 +@@ -439,6 +439,8 @@ def graph_definition():
37 +
38 + noncomma = "".join([c for c in printables if c != ","])
39 + alphastring_ = OneOrMore(CharsNotIn(noncomma + ' '))
40 ++ # override pyparsing tightened whitespace-skipping logic
41 ++ alphastring_.skipWhitespace = True
42 +
43 + def parse_html(s, loc, toks):
44 + return '<%s>' % ''.join(toks[0])
45
46 diff --git a/dev-python/pydot/pydot-1.4.2-r2.ebuild b/dev-python/pydot/pydot-1.4.2-r2.ebuild
47 new file mode 100644
48 index 000000000000..db3881e7fab5
49 --- /dev/null
50 +++ b/dev-python/pydot/pydot-1.4.2-r2.ebuild
51 @@ -0,0 +1,36 @@
52 +# Copyright 1999-2022 Gentoo Authors
53 +# Distributed under the terms of the GNU General Public License v2
54 +
55 +EAPI=7
56 +
57 +PYTHON_COMPAT=( python3_{8..10} )
58 +inherit distutils-r1
59 +
60 +DESCRIPTION="Python interface to Graphviz's Dot language"
61 +HOMEPAGE="https://github.com/pydot/pydot https://pypi.org/project/pydot/"
62 +# pypi releases don't include tests
63 +SRC_URI="https://github.com/pydot/pydot/archive/v${PV}.tar.gz -> ${P}.tar.gz"
64 +
65 +LICENSE="MIT"
66 +SLOT="0"
67 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris"
68 +IUSE="test"
69 +RESTRICT="!test? ( test )"
70 +
71 +RDEPEND="
72 + dev-python/pyparsing[${PYTHON_USEDEP}]
73 + media-gfx/graphviz"
74 +BDEPEND="
75 + test? (
76 + ${RDEPEND}
77 + dev-python/chardet[${PYTHON_USEDEP}]
78 + )"
79 +
80 +PATCHES=(
81 +# "${FILESDIR}"/${PN}-1.4.2-pyparsing-3.patch
82 +)
83 +
84 +python_test() {
85 + cd test || die
86 + "${PYTHON}" pydot_unittest.py || die "Test failed with ${EPYTHON}"
87 +}