Commit 38b80a8f authored by Daniel Veillard's avatar Daniel Veillard

trying to conciliate --with-python= requirements and RPM builds, a PITA

* configure.in libxml.spec.in python/Makefile.am: trying
  to conciliate --with-python= requirements and RPM builds,
  a PITA really...
Daniel
parent 3b811174
Wed May 14 14:56:46 EDT 2003 Daniel Veillard <daniel@veillard.com>
* configure.in libxml.spec.in python/Makefile.am: trying
to conciliate --with-python= requirements and RPM builds,
a PITA really...
Tue May 13 18:30:34 EDT 2003 Daniel Veillard <daniel@veillard.com>
* HTMLparser.c: oops last commit introduced a memory leak.
......
......@@ -251,6 +251,7 @@ PYTHON=
PYTHON_VERSION=
PYTHON_INCLUDES=
PYTHON_SITE_PACKAGES=
pythondir=
AC_ARG_WITH(python,
[ --with-python[[=DIR]] build Python bindings if found])
if test "$with_python" != "no" ; then
......@@ -299,6 +300,12 @@ if test "$with_python" != "no" ; then
fi
fi
fi
if test "$with_python" != ""
then
pythondir='$(PYTHON_SITE_PACKAGES)'
else
pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages'
fi
fi
AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
if test "$PYTHON_INCLUDES" != ""
......@@ -307,6 +314,7 @@ then
else
PYTHON_SUBDIR=
fi
AC_SUBST(pythondir)
AC_SUBST(PYTHON_SUBDIR)
dnl
......
Summary: Library providing XML and HTML support
Name: libxml2
Version: @VERSION@
Release: 1
Release: 667
License: MIT
Group: Development/Libraries
Source: ftp://xmlsoft.org/libxml2-%{version}.tar.gz
......@@ -73,26 +73,6 @@ rm -fr %{buildroot}
%makeinstall
#
# this is a bit ugly but tries to generate the bindings for all versions
# of python installed
#
for i in %{prefix}/include/python*
do
py_version=`echo $i | sed "s+%{prefix}/include/python++"`
if test -x %{prefix}/bin/python$py_version
then
echo generating bindings for Python $py_version
(cd python ; make clean ; \
make PYTHON="%{prefix}/bin/python$py_version" \
PYTHON_INCLUDES="%{prefix}/include/python$py_version" \
PYTHON_VERSION="$py_version"; \
%makeinstall PYTHON="%{prefix}/bin/python$py_version" \
PYTHON_INCLUDES="%{prefix}/include/python$py_version" \
PYTHON_VERSION="$py_version" )
fi
done
%clean
rm -fr %{buildroot}
......
......@@ -31,7 +31,6 @@ mylibs = \
all-local: libxml2.py
pythondir = $(libdir)/python${PYTHON_VERSION}/site-packages
python_LTLIBRARIES = libxml2mod.la
libxml2mod_la_SOURCES = libxml.c types.c libxml2-py.c
......@@ -41,9 +40,9 @@ libxml2.py: $(srcdir)/libxml.py $(srcdir)/libxml2class.py
cat $(srcdir)/libxml.py $(srcdir)/libxml2class.py > libxml2.py
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(libdir)/python${PYTHON_VERSION}/site-packages
@INSTALL@ -m 0644 libxml2.py $(DESTDIR)$(libdir)/python${PYTHON_VERSION}/site-packages
@INSTALL@ -m 0644 drv_libxml2.py $(DESTDIR)$(libdir)/python${PYTHON_VERSION}/site-packages
$(mkinstalldirs) $(DESTDIR)$(pythondir)
@INSTALL@ -m 0644 libxml2.py $(DESTDIR)$(pythondir)
@INSTALL@ -m 0644 drv_libxml2.py $(DESTDIR)$(pythondir)
$(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
@(for doc in $(DOCS) ; \
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment