[Lxml-checkins] r39357 - lxml/branch/nscleanup

scoder at codespeak.net scoder at codespeak.net
Sat Feb 24 16:30:05 CET 2007


Author: scoder
Date: Sat Feb 24 16:30:02 2007
New Revision: 39357

Modified:
   lxml/branch/nscleanup/setupinfo.py
Log:
allow compilation without objectify

Modified: lxml/branch/nscleanup/setupinfo.py
==============================================================================
--- lxml/branch/nscleanup/setupinfo.py	(original)
+++ lxml/branch/nscleanup/setupinfo.py	Sat Feb 24 16:30:02 2007
@@ -29,7 +29,12 @@
         print ("NOTE: Trying to build without Pyrex, pre-generated "
                "'src/lxml/etree.c' needs to be available.")
         source_extension = ".c"
-    
+
+    if OPTION_WITHOUT_OBJECTIFY:
+        modules = [ entry for entry in EXT_MODULES if entry[0] != 'objectify' ]
+    else:
+        modules = EXT_MODULES
+
     _include_dirs = include_dirs(static_include_dirs)
     _library_dirs = library_dirs(static_library_dirs)
     _cflags = cflags(static_cflags)
@@ -42,7 +47,7 @@
         runtime_library_dirs = []
     
     result = []
-    for module, package in EXT_MODULES:
+    for module, package in modules:
         result.append(
             Extension(
             package,
@@ -141,6 +146,7 @@
         return False
 
 # pick up any commandline options
+OPTION_WITHOUT_OBJECTIFY = has_option('without-objectify')
 OPTION_WITHOUT_ASSERT = has_option('without-assert')
 OPTION_WITHOUT_THREADING = has_option('without-threading')
 OPTION_STATIC = has_option('static')


More information about the lxml-checkins mailing list