Re: [Distutils] How to handle launcher script importability?

2013-08-12 Thread Paul Moore
On 12 August 2013 14:01, PJ Eby wrote: > This means that you can actually write source as a .pyz or .pwz file > on Windows, and it would Just Work -- *without any sys.path > modification*. > Conversely, you can right now rename a zipped file as xxx.py and it will be run happily as a Python stand

Re: [Distutils] How to handle launcher script importability?

2013-08-12 Thread PJ Eby
On Mon, Aug 12, 2013 at 7:33 AM, Nick Coghlan wrote: > Having pys and pyz for "executable, but not importable" (source and zip > archive forms) could be quite clean. In effect, the pys extension would > bring windows to parity with *nix, where "no extension at all" has > traditionally served the p

Re: [Distutils] How to handle launcher script importability?

2013-08-12 Thread Nick Coghlan
On 11 Aug 2013 21:37, "PJ Eby" wrote: > > On Sun, Aug 11, 2013 at 7:31 PM, Jason R. Coombs wrote: > >> -Original Message- > >> From: Nick Coghlan [mailto:ncogh...@gmail.com] > >> Sent: Sunday, 11 August, 2013 17:14 > >> > >> We actually have a proposal on import-sig to allow module specif

Re: [Distutils] How to handle launcher script importability?

2013-08-11 Thread PJ Eby
On Sun, Aug 11, 2013 at 7:31 PM, Jason R. Coombs wrote: >> -Original Message- >> From: Nick Coghlan [mailto:ncogh...@gmail.com] >> Sent: Sunday, 11 August, 2013 17:14 >> >> We actually have a proposal on import-sig to allow module specific import >> path manipulation (including the ability

Re: [Distutils] How to handle launcher script importability?

2013-08-11 Thread Jason R. Coombs
> -Original Message- > From: Nick Coghlan [mailto:ncogh...@gmail.com] > Sent: Sunday, 11 August, 2013 17:14 > > We actually have a proposal on import-sig to allow module specific import > path manipulation (including the ability to say "don't import this module > from this directory, even

Re: [Distutils] How to handle launcher script importability?

2013-08-11 Thread Nick Coghlan
We actually have a proposal on import-sig to allow module specific import path manipulation (including the ability to say "don't import this module from this directory, even though it looks like it is here"). I'd favour that mechanism over a new "not importable" file extension. If that doesn't mak

Re: [Distutils] How to handle launcher script importability?

2013-08-11 Thread PJ Eby
On Sun, Aug 11, 2013 at 1:58 PM, Jason R. Coombs wrote: > This sounds like a suitable idea, but as you mention in a subsequent > message, this format has issues with sys.path assumptions as well. Meh. It's basically, a one-line fix in the __main__.py, i.e.: import sys,os.path; sys.path[0] =

Re: [Distutils] How to handle launcher script importability?

2013-08-11 Thread Jason R. Coombs
> -Original Message- > From: PJ Eby [mailto:p...@telecommunity.com] > Sent: Sunday, 11 August, 2013 12:17 > > > Here's another problem with #1: you will break single-directory standalone > portable app installs, where you use "easy_install -mad somedir" to install all > of an app's depe

Re: [Distutils] How to handle launcher script importability?

2013-08-11 Thread PJ Eby
On Sun, Aug 11, 2013 at 12:17 PM, PJ Eby wrote: > May I suggest an option 5 instead? Use the new .pyz (or .pyzw for > non-console apps) as a zipped Python application. .pyz files aren't > importable, but *are* executable. That's basically all that's needed > to prevent importing -- a file exten

Re: [Distutils] How to handle launcher script importability?

2013-08-11 Thread PJ Eby
On Sun, Aug 11, 2013 at 10:38 AM, Jason R. Coombs wrote: > In Setuptools 1.0 (currently in beta), I've added an experimental, opt-in > feature to install pure Python launcher scripts on Windows instead of > installing a launcher executable for each script, with the intention that > these scripts w

<    1   2