[Distutils] Installing header files with setuptools

James Porter jvporter at wisc.edu
Wed Mar 3 23:18:34 CET 2010

On Wed, 2010-03-03 at 08:41 -0500, Carl Meyer wrote:
> James Porter wrote:
> > Hm. In that case, is there an easy way to get install_headers to run
> > when installing via easy_install (or pip) *without* passing special
> > arguments to it?
> Have you tried pip? Pip always uses --single-version-externally-managed,
> so if what Phillip says is correct, I would expect it to already just work.

This works, but it installs the headers in a surprising place. With the
"prefix" scheme, the headers end up in `pwd`/lib/include. With the
"home" scheme, the headers end up in <home>/lib/python/lib/include.

In either case I'd expect them to end up in <home-or-prefix>/include (or
something like that anyway). I'd *certainly* expect the prefix scheme
not to install the headers outside of the prefix.

The issue, it seems, is a workaround for virtualenv in pip/req.py:
<http://hg.notalon.org/ianb/pip/src/tip/pip/req.py#cl-515>. Since I'm
not actually using virtualenv, I don't know exactly what would happen
with that, but if there's a workaround for virtualenv, shouldn't it only
be activated when virtualenv is in use? Not that I know how to detect
that. :)

- Jim

More information about the Distutils-SIG mailing list