Hello,

I have a problem with distutils. During installation, I need to generate a
Python module containing information about the target installation paths.
For instance, if an user does:

setup.py install --install-headers=/foo

my module will have to contain something along the lines of:

headers= "/foo"

I managed to do this by subclassing install_lib (overriding method run) and
generating the module there. I access the target paths with things like
self.get_finalized_command("install_headers").install_dir. The module is
created into the build_dir, so that install_lib.run() then copy it together
with the other modules at the correct location.

This works like a charm *but* breaks when doing a bdist_wininst (and
probably a bdist_rpm, I haven't checked). I'm not sure how to deal with
that, as the final paths will be decided at installation time (depending on
the user's system), and that's outside of the scope of my setup.py script.

Suggestions? For instance, is there a way so that the Windows installer
generate an installation log, which my Python script can parse to extract
the directory information?
-- 
Giovanni Bajo

_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to