On Thu, 18 Oct 2012 15:37:13 -0700
Brian Harring <[email protected]> wrote:

> Offhand... and this makes it a bit more complex, but still tenuable 
> imo, but we could get around this via shoving the symlink pathway into 
> the shebang itself.
> 
> scenario 1:
> Script gets installed for 2.7, 3.1, 3.2; ignoring the shebang, it's 
> exactly the same md5 (meaning we can dedup it).  The shebang instead 
> of being /usr/bin/python-whatever, instead is the symlink pathway I'd 
> referenced.  Meaning it would be 
> /usr/libexec/python/2.7/3.1/3.2/wrapper .  If that script was 
> sphinx-build, this means that sphinx-build{,-{2.7,3.1,3.2}} are all 
> valid python scripts- they can be invoked either via /path/to/script 
> or ${python} /path/to/script.  There's a few details to sort there, 
> but nothing egregious best I can tell- implicit in this proposal is 
> that the wrapper would be smart enough to tell in which context it's 
> being invoked (sphinx-build vs sphinx-build-2.7).

How can you distinguish (from a Python script) whether it was run
directly or passed to pythonX.Y?

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: PGP signature

Reply via email to