diff options
author | Mike Hommey <mh@glandium.org> | 2004-04-19 05:38:48 +0000 |
---|---|---|
committer | Mike Hommey <mh@glandium.org> | 2004-04-19 05:38:48 +0000 |
commit | 81bcf076ea11e114a60e429338a15748066de163 (patch) | |
tree | 276010ab5d17f27a96c05f77004aa84a1763af7b /python | |
parent | d09ab089457ae3c20cc98f9afa03379c6ebf9598 (diff) | |
download | libxml2-81bcf076ea11e114a60e429338a15748066de163.tar.gz |
Load /tmp/tmp.LovooJ/libxml2-2.6.9 intoupstream/2.6.9
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'python')
-rw-r--r-- | python/Makefile.am | 6 | ||||
-rw-r--r-- | python/Makefile.in | 8 | ||||
-rwxr-xr-x | python/setup.py | 2 | ||||
-rw-r--r-- | python/tests/Makefile.am | 1 | ||||
-rw-r--r-- | python/tests/Makefile.in | 1 | ||||
-rwxr-xr-x | python/tests/reader8.py | 37 |
6 files changed, 48 insertions, 7 deletions
diff --git a/python/Makefile.am b/python/Makefile.am index 8782efb..f473421 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -51,9 +51,12 @@ GENERATE = generator.py API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml GENERATED= $(srcdir)/libxml2class.py \ $(srcdir)/libxml2-export.c \ + $(srcdir)/libxml2class.txt \ $(srcdir)/libxml2-py.c \ $(srcdir)/libxml2-py.h +CLEANFILES= $(GENERATED) gen_prog libxml2.py + $(GENERATED): gen_prog gen_prog: $(srcdir)/$(GENERATE) $(API_DESC) @@ -68,6 +71,3 @@ endif tests test: all cd tests && $(MAKE) tests -clean: - rm -f $(GENERATED) *.o _libxml.so *.pyc libxml2.py gen_prog - diff --git a/python/Makefile.in b/python/Makefile.in index c6684bd..25d2039 100644 --- a/python/Makefile.in +++ b/python/Makefile.in @@ -310,9 +310,11 @@ libxml2mod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/.libs @WITH_PYTHON_TRUE@API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml @WITH_PYTHON_TRUE@GENERATED = $(srcdir)/libxml2class.py \ @WITH_PYTHON_TRUE@ $(srcdir)/libxml2-export.c \ +@WITH_PYTHON_TRUE@ $(srcdir)/libxml2class.txt \ @WITH_PYTHON_TRUE@ $(srcdir)/libxml2-py.c \ @WITH_PYTHON_TRUE@ $(srcdir)/libxml2-py.h +@WITH_PYTHON_TRUE@CLEANFILES = $(GENERATED) gen_prog libxml2.py all: all-recursive .SUFFIXES: @@ -602,6 +604,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) @@ -609,6 +612,8 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + clean-am: clean-generic clean-libtool clean-pythonLTLIBRARIES \ mostlyclean-am @@ -701,9 +706,6 @@ uninstall-info: uninstall-info-recursive @WITH_PYTHON_FALSE@all: tests test: all cd tests && $(MAKE) tests - -clean: - rm -f $(GENERATED) *.o _libxml.so *.pyc libxml2.py gen_prog # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/python/setup.py b/python/setup.py index 170c7c9..1d342ac 100755 --- a/python/setup.py +++ b/python/setup.py @@ -226,7 +226,7 @@ else: setup (name = "libxml2-python", # On *nix, the version number is created from setup.py.in # On windows, it is set by configure.js - version = "2.6.8", + version = "2.6.9", description = descr, author = "Daniel Veillard", author_email = "veillard@redhat.com", diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am index a07497e..584ddbc 100644 --- a/python/tests/Makefile.am +++ b/python/tests/Makefile.am @@ -27,6 +27,7 @@ PYTESTS= \ reader5.py \ reader6.py \ reader7.py \ + reader8.py \ walker.py \ ctxterror.py\ readererr.py\ diff --git a/python/tests/Makefile.in b/python/tests/Makefile.in index eebc526..cd259be 100644 --- a/python/tests/Makefile.in +++ b/python/tests/Makefile.in @@ -269,6 +269,7 @@ PYTESTS = \ reader5.py \ reader6.py \ reader7.py \ + reader8.py \ walker.py \ ctxterror.py\ readererr.py\ diff --git a/python/tests/reader8.py b/python/tests/reader8.py new file mode 100755 index 0000000..53b7f27 --- /dev/null +++ b/python/tests/reader8.py @@ -0,0 +1,37 @@ +#!/usr/bin/python -u +# +# this tests the entities substitutions with the XmlTextReader interface +# +import sys +import StringIO +import libxml2 + +# Memory debug specific +libxml2.debugMemory(1) + +# +# Parse a document testing the Close() API +# +docstr="""<foo> +<label>some text</label> +<item>100</item> +</foo>""" + +reader = libxml2.readerForDoc(docstr, "test1", None, 0) +ret = reader.Read() +ret = reader.Read() +ret = reader.Close() + +if ret != 0: + print "Error closing the document test1" + sys.exit(1) + +del reader + +# Memory debug specific +libxml2.cleanupParser() +if libxml2.debugMemory(1) == 0: + print "OK" +else: + print "Memory leak %d bytes" % (libxml2.debugMemory(1)) + libxml2.dumpMemory() |