[Pythonmac-SIG] Re: Pythonmac-SIG Digest, Vol 20, Issue 24 (original) (raw)
Bob Ippolito bob at redivi.com
Tue Dec 21 14:47:41 CET 2004
- Previous message: [Pythonmac-SIG] Re: Pythonmac-SIG Digest, Vol 20, Issue 24
- Next message: [Pythonmac-SIG] Where to put data
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Dec 21, 2004, at 7:22 AM, Brian Lenihan wrote:
>> 208-186-56-189:/sw/bin jis$ cat /sw/bin/idle2.3 >> #!/sw/bin/python
Which python is first on your path? IIRC there is a feature in darwin that wreaks havoc with the setup code in python that finds the correct prefix (and library). This ends up always picking the prefix for the first python on the path. Darwinports contains a patch for that. Using "#!/usr/bin/env /sw/bin/python" should also work. The "feature" is that OS X does not include the full path to the executable in argv[0]. Using #!/usr/bin/env /path/to/python helps. Especially in the really annoying case where command line scripts work, but scripts launched from applications don't. Which reminds me, both pyobjc's and py2app's bdistmpkg also could be tweaked so preflight shell scripts won't fail to run on some systems:
Actually, using #!/usr/bin/env %(sys.executable_path) will cause it to fail to run in more cases than it will not. I'll take your patch for adding a junk extension, but not this one.
-bob
- Previous message: [Pythonmac-SIG] Re: Pythonmac-SIG Digest, Vol 20, Issue 24
- Next message: [Pythonmac-SIG] Where to put data
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]