distutils -- install_data in alternate --prefix

Jp Calderone exarkun at intarweb.us
Thu Dec 26 22:08:32 EST 2002


  In Pynfo, I have need to distribute several files that do not end with .py
to a subdirectory of the appropriate site-packages directory.  With the
following 

    data_files = [
        (data_prefix, 
         [os.path.join('Pynfo', 'plugins.tml')]),
        (os.path.join(data_prefix, 'plugins'),
         [os.path.join('Pynfo', 'plugins', 'plugins.tml')])
    ]

passed to distutil's setup(), and data_prefix defined as

data_prefix = os.path.join(
    sysconfig.get_config_var('BINLIBDEST'), 'site-packages', 'Pynfo'
)

I can achieve this.  However, when --prefix is passed to 'setup.py install',
distutils still tries to install these files in the normal location.

  Is there another config var to use, or a workaround for this?

  Thanks in advance,
    Jp

-- 
"One World, one Web, one Program." - Microsoft(R) promotional ad
"Ein Volk, ein Reich, ein Fuhrer." - Adolf Hitler
--
 12:00am up 10 days, 9:45, 6 users, load average: 1.03, 0.92, 0.58
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20021226/e8cdc2a0/attachment.sig>


More information about the Python-list mailing list