[Python-Dev] draft PEP: virtual environments
Antoine Pitrou
solipsis at pitrou.net
Sat Oct 29 17:23:42 CEST 2011
On Fri, 28 Oct 2011 12:37:35 -0600
Carl Meyer <carl at oddbird.net> wrote:
> What about include files?
> - -------------------------
>
> For example, ZeroMQ installs zmq.h and zmq_utils.h in $VE/include,
> whereas SIP (part of PyQt4) installs sip.h by default in
> $VE/include/pythonX.Y. With virtualenv, everything works because the
> PythonX.Y include is symlinked, so everything that's needed is in
> $VE/include. At the moment the reference implementation doesn't do
> anything with include files, besides creating the include directory;
> this might need to change, to copy/symlink $VE/include/pythonX.Y.
>
> As in Python there's no abstraction for a site-specific include
> directory, other than for platform-specific stuff, then the user
> expectation would seem to be that all include files anyone could ever
> want should be found in one of just two locations, with sysconfig
> labels "include" & "platinclude".
>
> There's another issue: what if includes are Python-version-specific?
> For example, SIP installs by default into $VE/include/pythonX.Y rather
> than $VE/include, presumably because there's version-specific stuff in
> there - but even if that's not the case with SIP, it could be the case
> with some other package.
Why would that be a problem? Do you plan to install several versions of
Python in a single VE?
> Activation and Utility Scripts
> - ------------------------------
>
> Virtualenv provides shell "activation" scripts as a user convenience,
> to put the virtual environment's Python binary first on the shell
> PATH. This is a maintenance burden, as separate activation scripts
> need to be provided and maintained for every supported shell.
We already have Unix shell scripts and BAT files in the source tree. Is
it really complicated to maintain these additional shell scripts? Is
there a lot of code in them?
Regards
Antoine.
More information about the Python-Dev
mailing list