Survey of complex usage of distutils.

Carl Banks imbosol at aerojockey.com
Thu May 15 14:16:06 EDT 2003


A.M. Kuchling wrote:
> On Thu, 15 May 2003 05:41:53 GMT, 
>        Carl Banks <imbosol at aerojockey.com> wrote:
>> Because there was no way (as far as I could tell) for Python scripts
>> to determine where the data files were installed, my setup.py usually
>> had something like this following call to setup, which looked into the
> 
> What would you need to fix this?  Just the value of
> install_data.install_dir?

No, it's not enough.  setup.py can accept arguments to install the
data files somewhere other than than install_dir.  The designers of
distutils gave it this capability, but evidently overlooked the fact
that scripts have no way of knowing where the data files might have
been installed.

Some packages get around this limitation by installing data files
alongside the .py files (for example, egenix packages).

If I had my wish, distutils would have an option to create (or fill
in) an installinfo.py, with all kinds of install data, for the benefit
of packages that need it.


> Side question: why not write the info.py file before calling setup(),
> trusting that the build and install commands will pick it up and install
> it?

Same answer: if someone specifies a different installation prefix, or
different data dir, then one would have to run setup to parse all the
command line arguments to figure out where the data dir is.  It's
easiest to pull the data out of the structure


-- 
CARL BANKS




More information about the Python-list mailing list