libxml2-py stable port information

Info2: <<
Package: libxml2-py%type_pkg[python]
Version: 2.7.8
Revision: 1
Distribution: (%type_pkg[python] = 25) 10.5, (%type_pkg[python] = 25) 10.6
Maintainer: Daniel Macks
Type: python (2.5 2.6 2.7)
Depends: libxml2-shlibs (>= %v-1), libiconv, python%type_pkg[python]
BuildDepends: <<
fink (>= 0.24.12-1),
fink-package-precedence,
libiconv-dev,
libncurses5 (>= 5.4-20041023-1006),
libxml2 (>= %v-1),
readline5 (>= 5.0-1004)
<<
#Source: mirror:gnome:sources/%n/2.6/%libxml2-%v.tar.bz2
Source: http://xmlsoft.org/sources/libxml2-%v.tar.gz
Source-MD5: 8127a65e8c3b08856093099b52599c86
PatchFile: %{ni}.patch
PatchFile-MD5: f205948963e3da9bf9d969b21c73fb2c
PatchScript: <<
%{default_script}
perl -pi -e 's/MAKEFLAGS\+=--silent//' `find . -name Makefile.in`
<<
SetCPPFLAGS: -I%p/include/libxml2
ConfigureParams: --mandir=%p/share/man --with-iconv=%p --with-python=%p/bin/python%type_raw[python] --disable-static --enable-dependency-tracking --with-html-dir=%p/share/doc --with-html-subdir=%n --with-history
CompileScript: <<
./configure %c
make -C python
fink-package-precedence .
<<
#InfoTest: <<
# TestScript: <<
# #!/bin/sh -ev
# # Self-tests fail for py25 on 10.6/i386 due to runtime
# # misuse of python interp binary. Looks like newly-
# # discovered previously-existing issue, so ignoring.
# if [ %type_pkg[python] != 25 ]; then
# make -C python tests || exit 2
# fi
# <<
#<<
InstallScript: <<
make -C python install DESTDIR=%d docsdir=%p/share/doc/%n exampledir=%p/share/doc/%n/examples
%p/bin/python%type_raw[python] %p/lib/python%type_raw[python]/compileall.py -d %p/lib/python%type_raw[python] %i/lib/python%type_raw[python]
<<
DocFiles: AUTHORS Copyright NEWS README python/README:README.py-bindings TODO python/TODO:TODO.py-bindings
Description: Python bindings for libxml2 library
DescPackaging: <<
Patch python module makefiles to use installed libxml2 not locally-built
See: http://bugzilla.gnome.org/show_bug.cgi?id=341290

Self-test (especially serialize.py) is are *extremely* fragile,
tend to fail for technically correct (but apparently not
expected) results on various platforms. Disabling for now.
<<
DescPort: <<
Fix tests target so that it gives cleaner feedback and propagates
failures correctly to the caller's shell.

Doesn't use the automake piece that compiles .py -> .pyc, so do it
manually in IntallScript.
See: http://bugzilla.gnome.org/show_bug.cgi?id=460113

Fix capitalization of charset-names in selftest. See:
https://bugzilla.gnome.org/show_bug.cgi?id=630682
<<
License: BSD
Homepage: http://www.xmlsoft.org/
<<

libxml2-py stable port .patch

diff -Nurd -x'*~' libxml2-2.7.8.orig/python/Makefile.in libxml2-2.7.8/python/Makefile.in
--- libxml2-2.7.8.orig/python/Makefile.in 2010-11-04 13:28:16.000000000 -0400
+++ libxml2-2.7.8/python/Makefile.in 2010-11-04 22:47:00.000000000 -0400
@@ -74,7 +74,7 @@
am__installdirs = "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(docsdir)" \
"$(DESTDIR)$(pythondir)" "$(DESTDIR)$(pythondir)"
LTLIBRARIES = $(python_LTLIBRARIES)
-@WITH_PYTHON_TRUE@libxml2mod_la_DEPENDENCIES = $(mylibs)
+@WITH_PYTHON_TRUE@libxml2mod_la_DEPENDENCIES =
am__libxml2mod_la_SOURCES_DIST = $(srcdir)/libxml.c $(srcdir)/types.c
@WITH_PYTHON_TRUE@am_libxml2mod_la_OBJECTS = libxml.lo types.lo
@WITH_PYTHON_TRUE@nodist_libxml2mod_la_OBJECTS = libxml2-py.lo
@@ -84,7 +84,7 @@
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libxml2mod_la_LDFLAGS) $(LDFLAGS) -o $@
@WITH_PYTHON_TRUE@am_libxml2mod_la_rpath = -rpath $(pythondir)
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
@@ -370,8 +370,6 @@
SUBDIRS = . tests
INCLUDES = \
-I$(PYTHON_INCLUDES) \
- -I$(top_srcdir)/include \
- -I$(top_builddir)/include \
-I$(top_builddir)/$(subdir)

docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)
@@ -387,7 +385,7 @@

libxml2mod_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -module -avoid-version
@WITH_PYTHON_TRUE@mylibs = \
-@WITH_PYTHON_TRUE@ $(top_builddir)/libxml2.la
+@WITH_PYTHON_TRUE@ -lxml2

@WITH_PYTHON_TRUE@python_LTLIBRARIES = libxml2mod.la
@WITH_PYTHON_TRUE@libxml2mod_la_SOURCES = $(srcdir)/libxml.c $(srcdir)/types.c
diff -Nurd -x'*~' libxml2-2.7.8.orig/python/setup.py libxml2-2.7.8/python/setup.py
--- libxml2-2.7.8.orig/python/setup.py 2010-11-04 13:28:24.000000000 -0400
+++ libxml2-2.7.8/python/setup.py 2010-11-04 22:47:00.000000000 -0400
@@ -231,7 +231,7 @@
author = "Daniel Veillard",
author_email = "veillard@redhat.com",
url = "http://xmlsoft.org/python.html",
- licence="MIT Licence",
+ license="MIT Licence",
py_modules=modules,
ext_modules=extens,
ext_package=ext_package,
diff -Nurd -x'*~' libxml2-2.7.8.orig/python/tests/Makefile.in libxml2-2.7.8/python/tests/Makefile.in
--- libxml2-2.7.8.orig/python/tests/Makefile.in 2010-11-04 13:28:16.000000000 -0400
+++ libxml2-2.7.8/python/tests/Makefile.in 2010-11-04 22:47:00.000000000 -0400
@@ -561,14 +561,21 @@

@WITH_PYTHON_TRUE@tests: $(PYTESTS)
@WITH_PYTHON_TRUE@ @echo "## running Python regression tests"
+@WITH_PYTHON_TRUE@ -@rm -f test.out
@WITH_PYTHON_TRUE@ -@(PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \
@WITH_PYTHON_TRUE@ export PYTHONPATH; \
-@WITH_PYTHON_TRUE@ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
-@WITH_PYTHON_TRUE@ export LD_LIBRARY_PATH; \
@WITH_PYTHON_TRUE@ for test in $(PYTESTS) ; \
-@WITH_PYTHON_TRUE@ do log=`$(PYTHON) $(srcdir)/$$test` ; \
+@WITH_PYTHON_TRUE@ do log=`$(PYTHON) $(srcdir)/$$test 2>&1` ; \
@WITH_PYTHON_TRUE@ if [ "`echo $$log | grep OK`" = "" ] ; then \
-@WITH_PYTHON_TRUE@ echo "-- $$test" ; echo "$$log" ; fi ; done)
+@WITH_PYTHON_TRUE@ echo "-- FAILED $$test" ; \
+@WITH_PYTHON_TRUE@ echo "$$log" ; \
+@WITH_PYTHON_TRUE@ echo " $$test" >> test.out ; \
+@WITH_PYTHON_TRUE@ else \
+@WITH_PYTHON_TRUE@ echo "-- OK $$test" ; \
+@WITH_PYTHON_TRUE@ fi ; \
+@WITH_PYTHON_TRUE@ done; \
+@WITH_PYTHON_TRUE@ )
+@WITH_PYTHON_TRUE@ @[ ! -s test.out ]
@WITH_PYTHON_FALSE@tests:

clean:
diff -Nurd -x'*~' libxml2-2.7.8.orig/python/tests/serialize.py libxml2-2.7.8/python/tests/serialize.py
--- libxml2-2.7.8.orig/python/tests/serialize.py 2009-09-24 11:31:59.000000000 -0400
+++ libxml2-2.7.8/python/tests/serialize.py 2011-01-04 02:52:56.000000000 -0500
@@ -96,7 +96,7 @@
if str != """


-
+
Hello

hello


@@ -111,7 +111,7 @@
doc.htmlSetMetaEncoding(None)
root = doc.getRootElement()
str = root.serialize()
-if str != """Hello

hello

""":
+if str != """Hello

hello

""":
print "error serializing HTML root 1"
sys.exit(1)
str = root.serialize("ISO-8859-1")
@@ -131,7 +131,7 @@
str = root.serialize("iso-8859-1", 1)
if str != """

-
+
Hello

hello


libxml2-py _unstable_ port .patch