[Distutils] Re: Variable substitution

Andrey Lebedev andrey at freemail.lt
Tue Oct 7 17:16:46 EDT 2003

On Fri, 03 Oct 2003 08:57:20 -0400, Stefan Seefeld wrote:

> Joel Becker wrote:
> I'd really like distutils to provide better support for this kind
> of thing. It doesn't seem that uncommon to have 'datafiles' that
> have to be referenced from inside the code.

I'm just facing this problem for my project. User has installed it from
source distribution to custom prefix (python setup.py install --prefix
/usr/local/kedpm-0.2.5) and program can't find its data files now.

After reading this list it seems there is no common way to inform program
at runtime where is it installed.

I'm looking for possibility to generate some sort of configuration module
on build time, e.g prefix.py::

  prefix = '/usr/lib/kedpm-0.2.5'
  exec-prefix = '/usr/lib/kedpm-0.2.5'

and importing it in application to adjust data files' locations.

Is anybody thought about such approach? Is there any known or possible
pitfalls with it?


Andrey Lebedev aka -.- . -.. -.. . .-.
Software engineer
Homepage: http://micro.lt/~andrey/
Jabber ID: kedder at jabber.ru

More information about the Distutils-SIG mailing list