#
# Setup script for libxml2 and libxslt if found
#
# On *nix, it is not needed (but should not harm),
# on Windows, it is set by configure.js.
# Thread-enabled libxml2
# 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
# dlls must be found somewhere in the PATH at runtime.
return 1
return 0
try:
except:
if WITHDLLS:
# create __init__.py for the libxmlmods package
def altImport(s):
return s
platformLibs = []
else:
# those are examined to find
# - iconv.h
# - libxslt/xsltconfig.h
includes_dir = [
];
for dir in includes_dir:
break;
if xml_includes == "":
print "failed to find headers for libxml2: update includes_dir"
for dir in includes_dir:
break;
if iconv_includes == "":
print "failed to find headers for libiconv: update includes_dir"
# those are added in the linker search path for libraries
libdirs = [
]
try:
try:
import xmlgenerator
except:
import generator
except:
print "failed to find and generate stubs for libxml2, aborting ..."
if WITHDLLS:
else:
print "libxslt stub generator not found, libxslt not built"
else:
try:
import xsltgenerator
except:
print "failed to generate stubs for libxslt, aborting ..."
else:
if WITHDLLS:
else:
else:
if with_xslt == 1:
for dir in includes_dir:
break;
if xslt_includes == "":
print "failed to find headers for libxslt: update includes_dir"
if WITHDLLS:
macros = []
if with_threads:
if with_xslt == 1:
#
# We are gonna build 2 identical shared libs with merge initializing
# both libxml2mod and libxsltmod
#
else:
#
# On windows the MERGED_MODULE option is not needed
# (and does not work)
#
if with_xslt == 1:
if missing("MANIFEST"):
if with_xslt == 1:
for file in xslt_files:
if WITHDLLS:
base = "lib/site-packages/"
else:
base = ""
else:
ext_package = None
data_files = []
# On *nix, the version number is created from setup.py.in
# On windows, it is set by configure.js
version = "2.6.31",
description = descr,
author = "Daniel Veillard",
author_email = "veillard@redhat.com",
licence="MIT Licence",
)