diff -Nurd -x'*~' libxml2-2.9.1.orig/python/Makefile.in libxml2-2.9.1/python/Makefile.in
--- libxml2-2.9.1.orig/python/Makefile.in	2013-04-19 03:36:12.000000000 -0400
+++ libxml2-2.9.1/python/Makefile.in	2014-03-16 03:26:38.000000000 -0400
@@ -110,7 +110,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
@@ -428,14 +428,12 @@
 	libxml2class.txt
 
 @WITH_PYTHON_TRUE@AM_CPPFLAGS = \
-@WITH_PYTHON_TRUE@	-I$(top_builddir)/include \
-@WITH_PYTHON_TRUE@	-I$(top_srcdir)/include	\
 @WITH_PYTHON_TRUE@	-I$(PYTHON_INCLUDES)
 
 @WITH_PYTHON_TRUE@python_LTLIBRARIES = libxml2mod.la
 @WITH_PYTHON_TRUE@libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c
-@WITH_PYTHON_TRUE@libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \
-@WITH_PYTHON_TRUE@        $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS)
+@WITH_PYTHON_TRUE@libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version -no-undefined \
+@WITH_PYTHON_TRUE@        -lxml2 $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS)
 
 @WITH_PYTHON_TRUE@BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c
 @WITH_PYTHON_TRUE@dist_python_DATA = \
diff -Nurd -x'*~' libxml2-2.9.1.orig/python/libxml_wrap.h libxml2-2.9.1/python/libxml_wrap.h
--- libxml2-2.9.1.orig/python/libxml_wrap.h	2013-04-01 22:25:28.000000000 -0400
+++ libxml2-2.9.1/python/libxml_wrap.h	2013-07-25 17:35:49.000000000 -0400
@@ -34,11 +34,11 @@
 #define PyBytes_AsString PyString_AsString
 #define PyBytes_AS_STRING PyString_AS_STRING
 #define PyBytes_GET_SIZE PyString_GET_SIZE
-
+#endif
+#ifndef PyCapsule_New
 #define PyCapsule_New PyCObject_FromVoidPtrAndDesc
 #define PyCapsule_CheckExact PyCObject_Check
 #define PyCapsule_GetPointer(o, n) PyCObject_GetDesc((o))
-
 #endif
 #endif
 
diff -Nurd -x'*~' libxml2-2.9.1.orig/python/setup.py libxml2-2.9.1/python/setup.py
--- libxml2-2.9.1.orig/python/setup.py	2013-04-19 03:36:20.000000000 -0400
+++ libxml2-2.9.1/python/setup.py	2013-06-09 05:10:34.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.9.1.orig/python/tests/Makefile.in libxml2-2.9.1/python/tests/Makefile.in
--- libxml2-2.9.1.orig/python/tests/Makefile.in	2013-04-19 03:36:12.000000000 -0400
+++ libxml2-2.9.1/python/tests/Makefile.in	2013-06-09 05:10:34.000000000 -0400
@@ -611,14 +611,21 @@
 @WITH_PYTHON_TRUE@tests: $(PYTESTS)
 @WITH_PYTHON_TRUE@	@for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done
 @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:
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
