Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : proto/python-efl

Dir     : e17/proto/python-efl/python-evas


Modified Files:
        setup.py 


Log Message:
Support -D in pkg-config flags, avoid failing on unknown flags.

Thanks to Vincent (caro) for reporting.


===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-evas/setup.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- setup.py    6 Dec 2007 15:28:11 -0000       1.22
+++ setup.py    29 Jan 2008 15:47:32 -0000      1.23
@@ -13,7 +13,8 @@
 
 
 def pkgconfig(*packages, **kw):
-    flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'}
+    flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries',
+                '-D': 'prepro_vars'}
     pkgs = ' '.join(packages)
     cmdline = 'pkg-config --libs --cflags %s' % pkgs
 
@@ -22,7 +23,11 @@
         raise ValueError("could not find pkg-config module: %s" % pkgs)
 
     for token in output.split():
-        kw.setdefault(flag_map.get(token[:2]), []).append(token[2:])
+        flag  = flag_map.get(token[:2], None)
+        if flag is not None:
+            kw.setdefault(flag, []).append(token[2:])
+        else:
+            print "WARNING: Unknown pkg-config flag: %s" % token
     return kw
 
 



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to