public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/blockdiag/files/, dev-python/blockdiag/
@ 2017-05-16  2:10 Brian Dolbec
  0 siblings, 0 replies; only message in thread
From: Brian Dolbec @ 2017-05-16  2:10 UTC (permalink / raw
  To: gentoo-commits

commit:     d0d8046cc0523fffbc271e41be8345bd256e5d1e
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 10 14:45:37 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue May 16 02:07:09 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0d8046c

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

 dev-python/blockdiag/blockdiag-1.5.3-r1.ebuild               |  8 +++++---
 .../blockdiag/files/blockdiag-1.5.3-py2_7-test-fix.patch     | 12 ++++++++++++
 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 7496b2c82d8..3f571f97e94 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 00000000000..e9ccfc82b9a
--- /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()


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-16  2:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-16  2:10 [gentoo-commits] repo/gentoo:master commit in: dev-python/blockdiag/files/, dev-python/blockdiag/ Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox