On 15 July 2013 18:26, Donald Stufft <don...@stufft.io> wrote: > Maybe this is a crazy idea, but would a windows only extension work? > .pye(executable) Then just associate .pye with the launcher. Python won't > see .pye as importable so there's no shadow issues.
That's actually a very good idea. The only downside is the proliferation of extensions involved, and the need to register them. That puts it into the territory of things the installer needs to do if we're to be able to assume it. But I may propose it to python-dev (Daniel proposed a "zipped Python app" extension a while back, as well. I'm not sure what happened with that one...) Actually, this and many of the other ideas fall foul of backward compatibility issues - we can't assume the Python launcher is available prior to Python 3.3, so #! support in .py files isn't available either. I think I'm coming to the conclusion that the best way forward is: 1. Continue using the setuptools exe launcher, but bundle our own copy. 2. Modify setup.py to install our own scripts run via the exe launcher, which don't rely on entry points and pkg_resources. 3. Special case the heck out of pip upgrading itself to ignore errors from trying to replace the exe (as long as the exe is unchanged, based on a size/checksum check) This covers the replacing-the-exe issue and the entry point script problems of vendoring setuptools. I don't *like* this option, but at least it's not going to break big chunks of our userbase... There are some other options I'd still like to explore before settling on something, for example making pip install from sdist *always* build a temporary wheel and then always install from wheels - we can then introspect the wheel before installing and catch this type of issue before starting. That lets us easily avoid the "overwriting the exe" issue, as well as letting us cleanly roll back failed installs. One thing is clear - this is a longer term effort, not a quick fix... Paul
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig