[60517] trunk/dports/python/py26-matplotlib
ram at macports.org
ram at macports.org
Sat Nov 14 09:02:32 PST 2009
Revision: 60517
http://trac.macports.org/changeset/60517
Author: ram at macports.org
Date: 2009-11-14 09:02:29 -0800 (Sat, 14 Nov 2009)
Log Message:
-----------
python/py26-matplotlib: fix EINTR in font_manger.py, fixes #22486
Modified Paths:
--------------
trunk/dports/python/py26-matplotlib/Portfile
Added Paths:
-----------
trunk/dports/python/py26-matplotlib/files/patch-eintr.diff
Modified: trunk/dports/python/py26-matplotlib/Portfile
===================================================================
--- trunk/dports/python/py26-matplotlib/Portfile 2009-11-14 16:46:44 UTC (rev 60516)
+++ trunk/dports/python/py26-matplotlib/Portfile 2009-11-14 17:02:29 UTC (rev 60517)
@@ -6,6 +6,7 @@
categories-append graphics math
name py26-matplotlib
version 0.99.1.1
+revision 1
maintainers ram openmaintainer
platforms darwin
@@ -36,7 +37,8 @@
patchfiles patch-setupext.py.diff \
patch-setup.cfg.diff \
- patch-disable_optional_deps.diff
+ patch-disable_optional_deps.diff \
+ patch-eintr.diff
build.env MPLIB_BASE="${prefix}" PKG_CONFIG_PATH="${python.prefix}/lib/pkgconfig/"
Added: trunk/dports/python/py26-matplotlib/files/patch-eintr.diff
===================================================================
--- trunk/dports/python/py26-matplotlib/files/patch-eintr.diff (rev 0)
+++ trunk/dports/python/py26-matplotlib/files/patch-eintr.diff 2009-11-14 17:02:29 UTC (rev 60517)
@@ -0,0 +1,46 @@
+--- lib/matplotlib/font_manager.py 2009/11/12 17:27:34 7952
++++ lib/matplotlib/font_manager.py 2009/11/12 17:28:22 7953
+@@ -42,7 +42,7 @@
+ see license/LICENSE_TTFQUERY.
+ """
+
+-import os, sys, glob
++import os, sys, glob, subprocess
+ try:
+ set
+ except NameError:
+@@ -292,16 +292,12 @@
+ grab all of the fonts the user wants to be made available to
+ applications, without needing knowing where all of them reside.
+ """
+- try:
+- import commands
+- except ImportError:
+- return {}
+-
+ fontext = get_fontext_synonyms(fontext)
+
+ fontfiles = {}
+- status, output = commands.getstatusoutput("fc-list file")
+- if status == 0:
++ pipe = subprocess.Popen(['fc-list', '', 'file'], stdout=subprocess.PIPE)
++ output = pipe.communicate()[0]
++ if pipe.returncode == 0:
+ for line in output.split('\n'):
+ fname = line.split(':')[0]
+ if (os.path.splitext(fname)[1][1:] in fontext and
+@@ -1244,11 +1240,11 @@
+ import re
+
+ def fc_match(pattern, fontext):
+- import commands
+ fontexts = get_fontext_synonyms(fontext)
+ ext = "." + fontext
+- status, output = commands.getstatusoutput('fc-match -sv "%s"' % pattern)
+- if status == 0:
++ pipe = subprocess.Popen(['fc-match', '-sv', pattern], stdout=subprocess.PIPE)
++ output = pipe.communicate()[0]
++ if pipe.returncode == 0:
+ for match in _fc_match_regex.finditer(output):
+ file = match.group(1)
+ if os.path.splitext(file)[1][1:] in fontexts:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091114/79e940a2/attachment.html>
More information about the macports-changes
mailing list