[Python-Dev] PEP 405 (Python Virtual Environments) and Windows script support

Carl Meyer carl at oddbird.net
Tue May 29 02:07:32 CEST 2012


On 05/28/2012 04:24 PM, Nick Coghlan wrote:
> It would have been better if the issue of script management on Windows
> had been raised in PEP 405 itself - I likely would have declared PEP
> 397 a dependency *before* accepting it (even if that meant the feature
> missed the alpha 4 deadline and first appeared in beta 1, or
> potentially even missed 3.3 altogether).
> 
> However, I'm not going to withdraw the acceptance of the PEP over this
> - while I would have made a different decision at the time given the
> additional information (due to the general preference to treat Windows
> as a first class deployment target), I think reversing my decision now
> would make the situation worse rather than better.

I think it's unfortunate that this issue (which is
http://bugs.python.org/issue12394) has become entangled with PEP 405 at
all, since AFAICT it is entirely orthogonal. This is a
distutils2/packaging issue regarding how scripts are installed on
Windows. It happens to be relevant when trying to install things into a
PEP 405 venv on Windows, but it applies to a non-virtual Python
installation on Windows every bit as much as it applies to a PEP 405
environment. In an earlier discussion with Vinay I thought we had agreed
that it was an orthogonal issue and that this proposed patch for it
would be removed from the PEP 405 reference implementation before it was
merged to CPython trunk; I think that would have been preferable.

This is why there is no mention of the issue in PEP 405 - it doesn't
belong there, because it is not related.

> That means the important question is what needs to happen before beta
> 1 at the end of June. As I see it, we have two ways forward:
> 
> 1. My preferred option: bring PEP 397 up to scratch as a specification
> for the behaviour of the Python launcher (perhaps with Vinay stepping
> up as a co-author to help Mark if need be), find a BDFL delegate (MvL?
> Brian Curtin?) and submit that PEP for acceptance within the next few
> weeks. The updated PEP 397 should include an explanation of exactly
> how it will help with the correct implementation of PEP 405 on Windows
> (this may involve making the launcher pyvenv aware).
> 
> 2. The fallback option: remove the currently checked in build
> artifacts from source control and incorporate them into the normal
> Windows build processes (both the main VS 2010 process, and at least
> the now-legacy VS 2008 process)
> 
> For alpha 4, I suggest going with MvL's suggestion - drop the binaries
> from Mercurial and accept that this aspect of PEP 405 simply won't
> work on Windows until the first beta.

Regardless, these sound like the right options moving forward, with the
clarification that it is not any "aspect of PEP 405" that will not work
until a fix is merged, it is simply an existing limitation of
distutils2/packaging on Windows. And that if anything needs to be
reverted, temporarily or permanently, it should not be all of the PEP
405 implementation, rather just this packaging fix.

Carl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120528/ec872152/attachment-0001.pgp>


More information about the Python-Dev mailing list