mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-30 10:38:07 -07:00
dev-python/blockdiag: Add python-3.5, 3.6 to PYTHON_COMPAT
Add python_test(), update deps as needed to fix tests, was missing webcolors and ipafonts dependencies (not listed in setup.py. Fix test failure in python-2.7 due to test needing to be updated to same as py3 NOTE: requires FEATURES=-network-sandbox for test_command.py (to fetch some icons) Package-Manager: Portage-2.3.5, Repoman-2.3.2_p30
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 )
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
@@ -29,17 +29,19 @@ DEPEND="
|
||||
dev-python/reportlab[${PYTHON_USEDEP}]
|
||||
dev-python/docutils[${PYTHON_USEDEP}]
|
||||
>=dev-python/pep8-1.3[${PYTHON_USEDEP}]
|
||||
media-fonts/ja-ipafonts
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}/blockdiag-1.5.3-py2_7-test-fix.patch")
|
||||
python_prepare_all() {
|
||||
sed -i -e /build-base/d setup.cfg || die
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_test() {
|
||||
ALL_TESTS=1 \
|
||||
esetup.py test
|
||||
# NOTE: requires FEATURES="-network-sandbox" for some tests to pass
|
||||
nosetests || die "Tests fail with ${EPYTHON}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -r 07f96892bfda src/blockdiag/tests/test_utils_fontmap.py
|
||||
--- a/src/blockdiag/tests/test_utils_fontmap.py Sat Aug 22 13:38:35 2015 +0900
|
||||
+++ b/src/blockdiag/tests/test_utils_fontmap.py Mon Apr 10 05:56:48 2017 -0700
|
||||
@@ -223,7 +223,7 @@
|
||||
_config = u("[fontmap]\nsansserif: %s\nsansserif: %s\n") % \
|
||||
(self.fontpath[0], self.fontpath[1])
|
||||
config = StringIO(_config)
|
||||
- if sys.version_info[0] == 2:
|
||||
+ if sys.version_info < (2, 7):
|
||||
fmap = FontMap(config)
|
||||
|
||||
font1 = fmap.find()
|
||||
Reference in New Issue
Block a user