From 94bb2f1ca62fa11929238d1c489a550f655e37dc Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Sun, 27 Apr 2003 22:14:07 +0000 Subject: [PATCH] =?UTF-8?q?applied=20patch=20from=20St=E9phane=20Bidoul=20?= =?UTF-8?q?for=20the=20Python=20bindings=20on=20the=20new?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * win32/configure.js python/setup.py.in: applied patch from Stéphane Bidoul for the Python bindings on the new release. Daniel --- ChangeLog | 6 ++++++ python/setup.py.in | 7 ++++++- win32/configure.js | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 40e8fb71..01a6d0c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Apr 28 00:12:11 CEST 2003 Daniel Veillard + + * win32/configure.js python/setup.py.in: applied patch + from Stéphane Bidoul for the Python bindings on the new + release. + Sun Apr 27 17:56:21 CEST 2003 Igor Zlatkovic * debugXML.c: included libxml/uri.h for xmlCanonicPath diff --git a/python/setup.py.in b/python/setup.py.in index a9976a26..7eaf5306 100755 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -10,6 +10,9 @@ from distutils.core import setup, Extension # on Windows, it is set by configure.js. ROOT = r'@prefix@' +# Thread-enabled libxml2 +with_threads = @WITH_THREADS@ + # If this flag is set (windows only), # a private copy of the dlls are included in the package. # If this flag is not set, the libxml2 and libxslt @@ -166,6 +169,8 @@ c_files = ['libxml2-py.c', 'libxml.c', 'types.c' ] includes= [xml_includes, iconv_includes] libs = [libraryPrefix + "xml2"] + platformLibs macros = [] +if with_threads: + macros.append(('_REENTRANT','1')) if with_xslt == 1: descr = "libxml2 and libxslt package" if not sys.platform.startswith('win'): @@ -194,7 +199,7 @@ extens=[Extension('libxml2mod', c_files, include_dirs=includes, if with_xslt == 1: extens.append(Extension('libxsltmod', xslt_c_files, include_dirs=includes, library_dirs=libdirs, - libraries=libs)) + libraries=libs, define_macros=macros)) if missing("MANIFEST"): diff --git a/win32/configure.js b/win32/configure.js index 1eab9c0a..46ae3054 100644 --- a/win32/configure.js +++ b/win32/configure.js @@ -274,6 +274,8 @@ function configureLibxmlPy() verMajor + "." + verMinor + "." + verMicro)); } else if (s.search(/\@prefix\@/) != -1) { of.WriteLine(s.replace(/\@prefix\@/, buildPrefix)); + } else if (s.search(/\@WITH_THREADS\@/) != -1) { + of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads == "no"? "0" : "1")); } else of.WriteLine(ln); }