[Lxml-checkins] r52384 - lxml/branch/lxml-2.0

scoder at codespeak.net scoder at codespeak.net
Tue Mar 11 18:40:07 CET 2008


Author: scoder
Date: Tue Mar 11 18:40:07 2008
New Revision: 52384

Modified:
   lxml/branch/lxml-2.0/CHANGES.txt
   lxml/branch/lxml-2.0/setupinfo.py
   lxml/branch/lxml-2.0/version.txt
Log:
merge -c 52383

Modified: lxml/branch/lxml-2.0/CHANGES.txt
==============================================================================
--- lxml/branch/lxml-2.0/CHANGES.txt	(original)
+++ lxml/branch/lxml-2.0/CHANGES.txt	Tue Mar 11 18:40:07 2008
@@ -2,6 +2,19 @@
 lxml changelog
 ==============
 
+2.0.3 (Under development)
+=========================
+
+Features added
+--------------
+
+Bugs fixed
+----------
+
+Other changes
+-------------
+
+
 2.0.2 (2008-02-22)
 ==================
 

Modified: lxml/branch/lxml-2.0/setupinfo.py
==============================================================================
--- lxml/branch/lxml-2.0/setupinfo.py	(original)
+++ lxml/branch/lxml-2.0/setupinfo.py	Tue Mar 11 18:40:07 2008
@@ -29,12 +29,25 @@
     else:
         modules = EXT_MODULES
 
+    lib_version = libxslt_version()
+    print("Using build configuration of libxslt %s" % lib_version)
+
     _include_dirs = include_dirs(static_include_dirs)
     _library_dirs = library_dirs(static_library_dirs)
     _cflags = cflags(static_cflags)
     _define_macros = define_macros()
     _libraries = libraries()
 
+    if _library_dirs:
+        message = "Building against libxml2/libxslt in "
+        if len(_library_dirs) > 1:
+            print(message + "one of the following directories:")
+            for dir in _library_dirs:
+                print("  " + dir)
+        else:
+            print(message + "the following directory: " +
+                  _library_dirs[0])
+
     if OPTION_AUTO_RPATH:
         runtime_library_dirs = _library_dirs
     else:
@@ -128,8 +141,7 @@
         macros.append(('WITHOUT_THREADING', None))
     return macros
 
-def flags(option):
-    cmd = "%s --%s" % (find_xslt_config(), option)
+def run_command(cmd):
     try:
         import subprocess
     except ImportError:
@@ -141,10 +153,21 @@
                              stdout=subprocess.PIPE, stderr=subprocess.PIPE)
         rf, ef = p.stdout, p.stderr
     errors = ef.read()
+    output = rf.read()
+    return output or '', errors or ''
+
+def libxslt_version():
+    cmd = "%s --version" % find_xslt_config()
+    output, errors = run_command(cmd)
     if errors:
         print("ERROR: %s" % errors)
         print("** make sure the development packages of libxml2 and libxslt are installed **\n")
-    return str(rf.read()).split()
+    return output.strip()
+
+def flags(option):
+    cmd = "%s --%s" % (find_xslt_config(), option)
+    output, _ = run_command(cmd)
+    return output.split()
 
 XSLT_CONFIG = None
 

Modified: lxml/branch/lxml-2.0/version.txt
==============================================================================
--- lxml/branch/lxml-2.0/version.txt	(original)
+++ lxml/branch/lxml-2.0/version.txt	Tue Mar 11 18:40:07 2008
@@ -1 +1 @@
-2.0.2
+2.0.3


More information about the lxml-checkins mailing list