Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pydot: fix upstream issue pydot/pydot#277
- Loading branch information
Anton Bolshakov
committed
Jan 4, 2022
1 parent
d4e14ee
commit e1df8db
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DIST pydot-1.4.2.tar.gz 272678 BLAKE2B 966f2c4ef3e26a63cc50ab89b5b6b5b413aabdfeddf994f2d5ba9dedaa1ed3152dd8060186e7380c3e768b783f7bfe1971cd600c18d1b73f7ac63db08ee3ace9 SHA512 caa8051561710129b5164fd1392da941829fd977092a6ec8b00efe7a199d2d60bc7ef13cb0e51615f384550f0fb80190d0f56b83d8d80d1fe372efb5dbbd3632 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/dot_parser.py.orig 2021-02-15 21:19:47.000000000 +0800 | ||
+++ b/dot_parser.py 2022-01-04 16:16:24.522390705 +0800 | ||
@@ -439,6 +439,8 @@ | ||
|
||
noncomma = "".join([c for c in printables if c != ","]) | ||
alphastring_ = OneOrMore(CharsNotIn(noncomma + ' ')) | ||
+ # override pyparsing tightened whitespace-skipping logic | ||
+ alphastring_.skipWhitespace = True | ||
|
||
def parse_html(s, loc, toks): | ||
return '<%s>' % ''.join(toks[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Copyright 1999-2021 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
PYTHON_COMPAT=( python3_{8..10} ) | ||
|
||
inherit distutils-r1 | ||
|
||
DESCRIPTION="Python interface to Graphviz's Dot language" | ||
HOMEPAGE="https://github.com/pydot/pydot https://pypi.org/project/pydot/" | ||
# pypi releases don't include tests | ||
SRC_URI="https://github.com/pydot/pydot/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="MIT" | ||
SLOT="0" | ||
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris" | ||
IUSE="test" | ||
RESTRICT="!test? ( test )" | ||
|
||
# See https://github.com/pydot/pydot/issues/277 for pyparsing dep | ||
RDEPEND=" | ||
>=dev-python/pyparsing-3[${PYTHON_USEDEP}] | ||
media-gfx/graphviz" | ||
BDEPEND=" | ||
test? ( | ||
${RDEPEND} | ||
dev-python/chardet[${PYTHON_USEDEP}] | ||
)" | ||
|
||
python_test() { | ||
cd test || die | ||
"${PYTHON}" pydot_unittest.py || die "Test failed with ${EPYTHON}" | ||
} | ||
|
||
#https://github.com/pydot/pydot/issues/277 | ||
PATCHES=( | ||
"${FILESDIR}"/281.patch | ||
) |