From fa49d87f92bdd6133f95e19b02bc214ade03099e Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Sat, 9 Mar 2002 10:20:00 +0000 Subject: [PATCH] fix to adapt varaiations in the bindings fixed to have the version of the * check-xml-test-suite.py: fix to adapt varaiations in the bindings * configure.in python/setup.py python/setup.py.in: fixed to have the version of the python scripts automatically updated Daniel --- ChangeLog | 7 ++++++ check-xml-test-suite.py | 40 +++++++++++++++++++++++++------- configure.in | 2 +- python/{setup.py => setup.py.in} | 2 +- 4 files changed, 41 insertions(+), 10 deletions(-) rename python/{setup.py => setup.py.in} (98%) diff --git a/ChangeLog b/ChangeLog index d6d3b713..3f210dfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Mar 9 11:16:11 CET 2002 Daniel Veillard + + * check-xml-test-suite.py: fix to adapt varaiations in the + bindings + * configure.in python/setup.py python/setup.py.in: fixed to + have the version of the python scripts automatically updated + Fri Mar 8 16:45:55 CET 2002 Daniel Veillard * tree.c: fixed a bug newly introduced and pointed by Uwe Fechner diff --git a/check-xml-test-suite.py b/check-xml-test-suite.py index 1929b70e..9fca112a 100755 --- a/check-xml-test-suite.py +++ b/check-xml-test-suite.py @@ -53,7 +53,10 @@ def loadNoentDoc(filename): return None ctxt.replaceEntities(1) ctxt.parseDocument() - doc = ctxt.doc() + try: + doc = ctxt.doc() + except: + doc = None if ctxt.wellFormed() != 1: doc.freeDoc() return None @@ -76,7 +79,10 @@ def testNotWf(filename, id): return -1 ctxt.parseDocument() - doc = ctxt.doc() + try: + doc = ctxt.doc() + except: + doc = None if error_nr == 0 or ctxt.wellFormed() != 0: print "%s: error: Well Formedness error not detected" % (id) log.write("%s: error: Well Formedness error not detected\n" % (id)) @@ -98,7 +104,10 @@ def testNotWfEnt(filename, id): ctxt.replaceEntities(1) ctxt.parseDocument() - doc = ctxt.doc() + try: + doc = ctxt.doc() + except: + doc = None if error_nr == 0 or ctxt.wellFormed() != 0: print "%s: error: Well Formedness error not detected" % (id) log.write("%s: error: Well Formedness error not detected\n" % (id)) @@ -121,7 +130,10 @@ def testNotWfEntDtd(filename, id): ctxt.loadSubset(1) ctxt.parseDocument() - doc = ctxt.doc() + try: + doc = ctxt.doc() + except: + doc = None if error_nr == 0 or ctxt.wellFormed() != 0: print "%s: error: Well Formedness error not detected" % (id) log.write("%s: error: Well Formedness error not detected\n" % (id)) @@ -144,7 +156,10 @@ def testWfEntDtd(filename, id): ctxt.loadSubset(1) ctxt.parseDocument() - doc = ctxt.doc() + try: + doc = ctxt.doc() + except: + doc = None if ctxt.wellFormed() == 0: print "%s: error: wrongly failed to parse the document" % (id) log.write("%s: error: wrongly failed to parse the document\n" % (id)) @@ -172,7 +187,10 @@ def testError(filename, id): ctxt.loadSubset(1) ctxt.parseDocument() - doc = ctxt.doc() + try: + doc = ctxt.doc() + except: + doc = None if ctxt.wellFormed() == 0: print "%s: warning: failed to parse the document but accepted" % (id) log.write("%s: warning: failed to parse the document but accepte\n" % (id)) @@ -199,7 +217,10 @@ def testInvalid(filename, id): ctxt.validate(1) ctxt.parseDocument() - doc = ctxt.doc() + try: + doc = ctxt.doc() + except: + doc = None valid = ctxt.isValid() if doc == None: print "%s: error: wrongly failed to parse the document" % (id) @@ -232,7 +253,10 @@ def testValid(filename, id): ctxt.validate(1) ctxt.parseDocument() - doc = ctxt.doc() + try: + doc = ctxt.doc() + except: + doc = None valid = ctxt.isValid() if doc == None: print "%s: error: wrongly failed to parse the document" % (id) diff --git a/configure.in b/configure.in index 785f9d1f..5bc63d5c 100644 --- a/configure.in +++ b/configure.in @@ -554,5 +554,5 @@ AC_SUBST(RDL_LIBS) rm -f rm COPYING.LIB COPYING ln -s Copyright COPYING -AC_OUTPUT(libxml.spec Makefile include/Makefile include/libxml/Makefile doc/Makefile example/Makefile python/Makefile python/tests/Makefile include/libxml/xmlversion.h include/libxml/xmlwin32version.h xml2-config libxml-2.0.pc xml2Conf.sh) +AC_OUTPUT(libxml.spec Makefile include/Makefile include/libxml/Makefile doc/Makefile example/Makefile python/Makefile python/tests/Makefile include/libxml/xmlversion.h include/libxml/xmlwin32version.h xml2-config libxml-2.0.pc xml2Conf.sh python/setup.py) diff --git a/python/setup.py b/python/setup.py.in similarity index 98% rename from python/setup.py rename to python/setup.py.in index 57a890a2..e302d9ec 100755 --- a/python/setup.py +++ b/python/setup.py.in @@ -105,7 +105,7 @@ if missing("MANIFEST"): manifest.close() setup (name = "libxml2-python", - version = "2.4.16", + version = "@LIBXML_VERSION@", description = descr, author = "Daniel Veillard", author_email = "veillard@redhat.com",