1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-12 09:17:37 +03:00

Fix Python bindings under Windows

- Correct linker flags for MinGW-w64
- Adjust PATH to find libxml2.dll when running tests
This commit is contained in:
Nick Wellnhofer 2018-01-23 16:40:36 +01:00
parent e8fdf5df6e
commit 7f40ed01f7
2 changed files with 9 additions and 1 deletions

View File

@ -1620,7 +1620,14 @@ case "$host" in
WIN32_EXTRA_LDFLAGS="-no-undefined"
if test "${PYTHON}" != ""
then
WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython$(echo ${PYTHON_VERSION} | tr -d .)"
case "$host" in
*-w64-mingw*)
WIN32_EXTRA_PYTHON_LIBADD="-shrext .pyd -L${pythondir}/../../lib -lpython${PYTHON_VERSION}"
;;
*)
WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython$(echo ${PYTHON_VERSION} | tr -d .)"
;;
esac
fi
;;
*-*-cygwin*)

View File

@ -66,6 +66,7 @@ tests: $(PYTESTS)
export PYTHONPATH; \
LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
export LD_LIBRARY_PATH; \
export PATH="$(top_builddir)/.libs:$$PATH" ; \
for test in $(PYTESTS) ; \
do log=`$(PYTHON) $(srcdir)/$$test` ; \
if [ "`echo $$log | grep OK`" = "" ] ; then \