summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2017-04-10 07:45:37 -0700
committerBrian Dolbec <dolsen@gentoo.org>2017-05-15 19:07:09 -0700
commitd0d8046cc0523fffbc271e41be8345bd256e5d1e (patch)
treed0f534c931ac35dfa564c0f255138e90d1c13650 /dev-python/blockdiag
parentdev-python/txaio: Version bump (diff)
downloadgentoo-d0d8046cc0523fffbc271e41be8345bd256e5d1e.tar.gz
gentoo-d0d8046cc0523fffbc271e41be8345bd256e5d1e.tar.bz2
gentoo-d0d8046cc0523fffbc271e41be8345bd256e5d1e.zip
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
Diffstat (limited to 'dev-python/blockdiag')
-rw-r--r--dev-python/blockdiag/blockdiag-1.5.3-r1.ebuild8
-rw-r--r--dev-python/blockdiag/files/blockdiag-1.5.3-py2_7-test-fix.patch12
2 files changed, 17 insertions, 3 deletions
diff --git a/dev-python/blockdiag/blockdiag-1.5.3-r1.ebuild b/dev-python/blockdiag/blockdiag-1.5.3-r1.ebuild
index 7496b2c82d81..3f571f97e942 100644
--- a/dev-python/blockdiag/blockdiag-1.5.3-r1.ebuild
+++ b/dev-python/blockdiag/blockdiag-1.5.3-r1.ebuild
@@ -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() {
diff --git a/dev-python/blockdiag/files/blockdiag-1.5.3-py2_7-test-fix.patch b/dev-python/blockdiag/files/blockdiag-1.5.3-py2_7-test-fix.patch
new file mode 100644
index 000000000000..e9ccfc82b9a0
--- /dev/null
+++ b/dev-python/blockdiag/files/blockdiag-1.5.3-py2_7-test-fix.patch
@@ -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()