[Distutils] Installing third-party files in modules

Sébastien Pierre spierre@isb-sib.ch
Tue Dec 18 03:38:00 2001


Le lundi 17 décembre 2001, à 09:59 PM, M.-A. Lemburg a écrit :

> Sébastien Pierre wrote:
>>
>> Hi all,
>>
>> I have a module a module "spam" that contains the "foo.py" file,
>> plus some other files like "burps.xsl" or "bar.xml". What I want
>> to do is when making a "setup.py install" that the "burps.xsl"
>> and "bar.xml" get installed directly into the site-packages in
>> the "spam" module.
>>
>> Actually distutils seems to ignore non "*.py" files. How can I
>> override this?
>
> You should try to install them using the data_files option.
> If that doesn't help, you can always subclass the various commands
> to better fit your needs. See mxSetup.py in egenix-mx-base for
> an example.

I have looked (quickly) into mxSetup but have not found what I 
am looking fore. It seems like the data_files do not allow to 
specify source and target locations in the file system.

If I specify the "spam/bar.xml" in the data_files, will it we 
outputted in sitepackages/spam/bar.xml ?

Cheers

  -- Sébastien.

--
«My friends says we're like the dinosaurs, only we are doing
ourselves in much faster than they ever did.»
<http://www.type-z.org>                     Porno For Pyros, Pets