[Lxml-checkins] r53915 - lxml/trunk

scoder at codespeak.net scoder at codespeak.net
Sun Apr 20 18:32:36 CEST 2008


Author: scoder
Date: Sun Apr 20 18:32:33 2008
New Revision: 53915

Modified:
   lxml/trunk/   (props changed)
   lxml/trunk/setupinfo.py
Log:
 r4023 at delle:  sbehnel | 2008-04-20 18:30:20 +0200
 allow passing all cmd line options also as environment variables


Modified: lxml/trunk/setupinfo.py
==============================================================================
--- lxml/trunk/setupinfo.py	(original)
+++ lxml/trunk/setupinfo.py	Sun Apr 20 18:32:33 2008
@@ -256,7 +256,12 @@
         sys.argv.remove('--%s' % name)
         return True
     except ValueError:
-        return False
+        pass
+    # allow passing all cmd line options also as environment variables
+    env_val = os.getenv(name.upper().replace('-', '_'), 'false').upper()
+    if env_val == "true":
+        return True
+    return False
 
 # pick up any commandline options
 OPTION_WITHOUT_OBJECTIFY = has_option('without-objectify')


More information about the lxml-checkins mailing list