[44329] trunk/dports/python/py25-matplotlib/files/ patch-disable_optional_deps.diff
ram at macports.org
ram at macports.org
Fri Dec 26 03:56:13 PST 2008
Revision: 44329
http://trac.macports.org/changeset/44329
Author: ram at macports.org
Date: 2008-12-26 03:56:12 -0800 (Fri, 26 Dec 2008)
Log Message:
-----------
python/py25-matplotlib: add missing patch
Added Paths:
-----------
trunk/dports/python/py25-matplotlib/files/patch-disable_optional_deps.diff
Added: trunk/dports/python/py25-matplotlib/files/patch-disable_optional_deps.diff
===================================================================
--- trunk/dports/python/py25-matplotlib/files/patch-disable_optional_deps.diff (rev 0)
+++ trunk/dports/python/py25-matplotlib/files/patch-disable_optional_deps.diff 2008-12-26 11:56:12 UTC (rev 44329)
@@ -0,0 +1,163 @@
+--- setupext.py.orig 2008-12-26 09:37:15.000000000 +0000
++++ setupext.py 2008-12-26 10:54:54.000000000 +0000
+@@ -350,43 +350,58 @@
+ return '.'.join(temp)
+
+ def check_for_qt():
+- try:
+- import pyqtconfig
+- except ImportError:
++ MP_QT=False
++ if MP_QT:
++ try:
++ import pyqtconfig
++ except ImportError:
++ print_status("Qt", "no")
++ return False
++ else:
++ try:
++ qt_version = pyqtconfig.Configuration().qt_version
++ qt_version = convert_qt_version(qt_version)
++ except AttributeError:
++ qt_version = "<unknown>"
++ print_status("Qt", "Qt: %s, PyQt: %s" %
++ (qt_version,
++ pyqtconfig.Configuration().pyqt_version_str))
++ return True
++ else:
+ print_status("Qt", "no")
+ return False
+- else:
+- try:
+- qt_version = pyqtconfig.Configuration().qt_version
+- qt_version = convert_qt_version(qt_version)
+- except AttributeError:
+- qt_version = "<unknown>"
+- print_status("Qt", "Qt: %s, PyQt: %s" %
+- (qt_version,
+- pyqtconfig.Configuration().pyqt_version_str))
+- return True
+
+ def check_for_qt4():
+- try:
+- from PyQt4 import pyqtconfig
+- except ImportError:
++ MP_QT4=False
++ if MP_QT4:
++ try:
++ from PyQt4 import pyqtconfig
++ except ImportError:
++ print_status("Qt4", "no")
++ return False
++ else:
++ print_status("Qt4", "Qt: %s, PyQt4: %s" %
++ (convert_qt_version(pyqtconfig.Configuration().qt_version),
++ pyqtconfig.Configuration().pyqt_version_str))
++ return True
++ else:
+ print_status("Qt4", "no")
+ return False
+- else:
+- print_status("Qt4", "Qt: %s, PyQt4: %s" %
+- (convert_qt_version(pyqtconfig.Configuration().qt_version),
+- pyqtconfig.Configuration().pyqt_version_str))
+- return True
+
+ def check_for_cairo():
+- try:
+- import cairo
+- except ImportError:
++ MP_Cairo=False
++ if MP_Cairo:
++ try:
++ import cairo
++ except ImportError:
++ print_status("Cairo", "no")
++ return False
++ else:
++ print_status("Cairo", cairo.version)
++ return True
++ else:
+ print_status("Cairo", "no")
+ return False
+- else:
+- print_status("Cairo", cairo.version)
+- return True
+
+ def check_for_datetime():
+ try:
+@@ -503,36 +518,51 @@
+ return False
+
+ def check_for_dvipng():
+- try:
+- stdin, stdout = run_child_process('dvipng -version')
+- print_status("dvipng", stdout.readlines()[1].split()[-1])
+- return True
+- except (IndexError, ValueError):
++ MP_LaTeX=False
++ if MP_LaTeX:
++ try:
++ stdin, stdout = run_child_process('dvipng -version')
++ print_status("dvipng", stdout.readlines()[1].split()[-1])
++ return True
++ except (IndexError, ValueError):
++ print_status("dvipng", "no")
++ return False
++ else:
+ print_status("dvipng", "no")
+ return False
+
+ def check_for_ghostscript():
+- try:
+- if sys.platform == 'win32':
+- command = 'gswin32c --version'
+- else:
+- command = 'gs --version'
+- stdin, stdout = run_child_process(command)
+- print_status("ghostscript", stdout.read()[:-1])
+- return True
+- except (IndexError, ValueError):
++ MP_GhostScript=False
++ if MP_GhostScript:
++ try:
++ if sys.platform == 'win32':
++ command = 'gswin32c --version'
++ else:
++ command = 'gs --version'
++ stdin, stdout = run_child_process(command)
++ print_status("ghostscript", stdout.read()[:-1])
++ return True
++ except (IndexError, ValueError):
++ print_status("ghostscript", "no")
++ return False
++ else:
+ print_status("ghostscript", "no")
+- return False
++ return True
+
+ def check_for_latex():
+- try:
+- stdin, stdout = run_child_process('latex -version')
+- line = stdout.readlines()[0]
+- pattern = '3\.1\d+'
+- match = re.search(pattern, line)
+- print_status("latex", match.group(0))
+- return True
+- except (IndexError, ValueError, AttributeError):
++ MP_LaTeX=False
++ if MP_LaTeX:
++ try:
++ stdin, stdout = run_child_process('latex -version')
++ line = stdout.readlines()[0]
++ pattern = '3\.1\d+'
++ match = re.search(pattern, line)
++ print_status("latex", match.group(0))
++ return True
++ except (IndexError, ValueError, AttributeError):
++ print_status("latex", "no")
++ return False
++ else:
+ print_status("latex", "no")
+ return False
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081226/10dffc6c/attachment.html>
More information about the macports-changes
mailing list