public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/blockdiag/files/, dev-python/blockdiag/
Date: Tue, 16 May 2017 02:10:49 +0000 (UTC)	[thread overview]
Message-ID: <1494900429.d0d8046cc0523fffbc271e41be8345bd256e5d1e.dolsen@gentoo> (raw)

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()


                 reply	other threads:[~2017-05-16  2:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1494900429.d0d8046cc0523fffbc271e41be8345bd256e5d1e.dolsen@gentoo \
    --to=dolsen@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox