[Distutils] Header installation

M.-A. Lemburg mal@lemburg.com
Thu Mar 29 03:32:04 2001


Konrad Hinsen wrote:
> 
> > There is a command install_headers which could be what you are
> > looking for. If that doesn't work, you could try to use
> 
> I think this is what I am already using by writing headers = [...]
> (please correct me if I am wrong). And it works fine, except that I
> don't know how to tell it *where* I want my header files installed.

>From reading the source for install_headers:

    user_options = [('install-dir=', 'd',
                     "directory to install header files to"),
                    ('force', 'f',
                     "force installation (overwrite existing files)"),
                   ]

--install-dir defaults to the value of --install-headers of the
install command:

        ('install-headers=', None,
         "installation directory for C/C++ headers"),

This again defaults to:

    'unix_prefix': # without PYTHONHOME set
        'headers': '$base/include/python$py_version_short/$dist_name',

    'unix_home': # with PYTHONHOME set
        'headers': '$base/include/python/$dist_name',

    'nt':
        'headers': '$base/Include/$dist_name',

    'mac':
        'headers': '$base/Include/$dist_name',
 
At least in theory, adding the install_header option to your
setup.cfg file should do the trick.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Pages:                           http://www.lemburg.com/python/