[Top][All Lists]

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

substitute datadir in python script

From: Bastien Dalla Piazza
Subject: substitute datadir in python script
Date: Sat, 07 Mar 2009 13:51:32 +0100

Hi all,

I'm developing an application with mixed C++ and python.

I wonder how to do the following:

let's assume "" is a python extention library installed in
$(pyexecdir) which depends on the prefix given by the user.

Up to now, I was substituting the absolute directories path at install
time using "sed" on my scripts source files, so adding to
        sed -e
$(datadir)/@PACKAGE@/#g" >

substituting "pyexecdir" in order to allow "import alib" in the
installed scripts and "datadir" to allow access to the installed data
files (like images).

This solution feels a bit clumsy because I need the file names
"" and "" to deferenciate the original and the
substituted files.
I think I need an equivalent in python of the "config.h" header file,
but where to install it? Or is there a standard way to achieve the


reply via email to

[Prev in Thread] Current Thread [Next in Thread]