[pypy-svn] r72617 - pypy/trunk/pypy/translator/platform

arigo at codespeak.net arigo at codespeak.net
Tue Mar 23 13:46:17 CET 2010


Author: arigo
Date: Tue Mar 23 13:46:16 2010
New Revision: 72617

Modified:
   pypy/trunk/pypy/translator/platform/posix.py
Log:
If pkg-config is not installed, don't crash, but just
return the default.


Modified: pypy/trunk/pypy/translator/platform/posix.py
==============================================================================
--- pypy/trunk/pypy/translator/platform/posix.py	(original)
+++ pypy/trunk/pypy/translator/platform/posix.py	Tue Mar 23 13:46:16 2010
@@ -48,7 +48,10 @@
         return include_dirs
 
     def _pkg_config(self, lib, opt, default):
-        ret, out, err = _run_subprocess("pkg-config", [lib, opt])
+        try:
+            ret, out, err = _run_subprocess("pkg-config", [lib, opt])
+        except OSError:
+            ret = 1
         if ret:
             return default
         # strip compiler flags



More information about the Pypy-commit mailing list