diff options
author | dobey <dobey> | 2006-08-18 20:27:57 +0000 |
---|---|---|
committer | dobey <dobey> | 2006-08-18 20:27:57 +0000 |
commit | ffc7c751a76448614fa6cb608a648f77a761d9d0 (patch) | |
tree | c8e013c81c955bd5c1d5d6d3462f9e549745e4bd | |
parent | cdb3a4ba8c64a089dbba65603299df01a0b08d92 (diff) |
2006-08-18 Rodney Dawes <dobey@novell.com>
* configure.ac: Determine the python site-packages path and substitute
it for the Makefiles to use
* find-python-path.py: Add this script to discover the python path
* python/Makefile.am: Remove the pythondir declaration from here, as
it is now defined by the configure script
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rwxr-xr-x | find-python-path.py | 14 | ||||
-rw-r--r-- | python/Makefile.am | 2 |
4 files changed, 29 insertions, 3 deletions
@@ -0,0 +1,9 @@ +2006-08-18 Rodney Dawes <dobey@novell.com> + + * configure.ac: Determine the python site-packages path and substitute + it for the Makefiles to use + + * find-python-path.py: Add this script to discover the python path + + * python/Makefile.am: Remove the pythondir declaration from here, as + it is now defined by the configure script diff --git a/configure.ac b/configure.ac index 2e72c2b..86dbc04 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,12 @@ AC_COPYRIGHT([Copyright 2006 Novell, Inc.]) AM_INIT_AUTOMAKE AM_MAINTAINER_MODE +AC_MSG_CHECKING([python site path]) +pythonsitedir="`./find-python-path.py`" +pythondir="\${libdir}/${pythonsitedir}" +AC_MSG_RESULT([$pythondir]) +AC_SUBST(pythondir) + AC_CONFIG_FILES([ Makefile python/Makefile @@ -15,4 +21,3 @@ scripts/Makefile ]) AC_OUTPUT - diff --git a/find-python-path.py b/find-python-path.py new file mode 100755 index 0000000..21ecb12 --- /dev/null +++ b/find-python-path.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +import sys +from os.path import split, basename + +def find_path (): + for path in sys.path: + (head, tail) = split (path) + if tail == 'site-packages': + base = basename (head) + print base + '/' + tail + return + +find_path () diff --git a/python/Makefile.am b/python/Makefile.am index 77b028a..1a42a7f 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -1,6 +1,4 @@ -pythondir = $(libdir)/python/site-packages - python_DATA = A11yTestUtils.py EXTRA_DIST = $(python_DATA) |