[xml] pythondir in Makefile.am suggestion



Hi,

I have Python installed in separate directory (/opt/python). It works fine when
specified by --with-python=/opt/python. But the result after compilation is
installed in /usr/lib/python2.2/site-packages, which doesn't correspond to my
Python location. What do you think about installing it into the path found in
PYTHON_SITE_PACKAGES ?

I tryied to fix it for myself and it seems to work fine.


--- libxml2-2.5.4/python/Makefile.am    2003-01-06 13:28:32.000000000 +0100
+++ libxml-fixed/python/Makefile.am     2003-03-17 13:21:30.000000000 +0100
@@ -31,7 +31,7 @@
 
 all-local:     libxml2.py
 
-pythondir = $(libdir)/python${PYTHON_VERSION}/site-packages
+pythondir = $(PYTHON_SITE_PACKAGES)
 python_LTLIBRARIES = libxml2mod.la
 
 libxml2mod_la_SOURCES = libxml.c types.c libxml2-py.c
@@ -41,9 +41,9 @@
        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) $(pythondir)
+       @INSTALL@ -m 0644 libxml2.py $(pythondir)
+       @INSTALL@ -m 0644 drv_libxml2.py $(pythondir)
        $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
        @(for doc in $(DOCS) ; \
           do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)


With regards, 

Petr Koloros




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]