Re: [Pythonmac-SIG] py2app crash if path contains a colon

2006-06-16 Thread Ronald Oussoren
 
On Wednesday, June 14, 2006, at 05:18PM, Bob Ippolito <[EMAIL PROTECTED]> wrote:

>python itself needs to be in a directory containing a colon.
>
>bump:~/src/python/:colon bob$ ./python.exe -c "import sys; print  
>sys.path"
>'import site' failed; use -v for traceback
>['', '/usr/local/lib/python25.zip', '/Users/bob/src/python/',  
>'colon/../Lib/', '/Users/bob/src/python/', 'colon/../Lib/plat- 
>darwin', '/Users/bob/src/python/', 'colon/../Lib/plat-mac', '/Users/ 
>bob/src/python/', 'colon/../Lib/plat-mac/lib-scriptpackages', '/Users/ 
>bob/src/python/', 'colon/../Lib/lib-tk', '/Users/bob/src/python/',  
>'colon/Modules']

This is now python bug #1507224. It might be possible to work around this in 
py2app's executable stub, I don't have time to look atthis at the moment.

Ronald

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Can't build 2.4.3 against X11 Tcl/Tk

2006-06-16 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

This is a new twist on an old problem.

I'm trying to build a standard Unix version of Python (without
- -enable-framework) and link it against an X11-based version of Tcl/Tk.
However, no matter what I do, it builds against the system-installed
Tk/Aqua.

Googling for some solutions to this problem has turned up lots of
complaints about Python linking against an X11 version of Tk (usually
Fink's). How far we've come! :-)

Anyway, here are the flags I'm using to run the build:

export CFLAGS="-arch ppc -arch i386 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
- -I/usr/local/tcl-tk-unix/include"

export LDFLAGS="-L/usr/local/tcl-tk-unix/lib"


./configure --prefix=/usr/local/python-unix --enable-threads

I know it would be simple to use a Fink or DarwinPorts version of
Python, but I want this version to link against the universal X11 build
of Tcl/Tk I have installed.

Any advice?

- --
Kevin Walzer
Poetic Code
http://www.kevin-walzer.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEkt8BrTC5hIgjqTMRAklrAJ9ud55r7wCpdqfg4XN08OCUCoKkPwCfRiTH
LYSEzUFUWuaEdynMTHM2sd8=
=rltL
-END PGP SIGNATURE-
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Can't build 2.4.3 against X11 Tcl/Tk

2006-06-16 Thread Bob Ippolito

On Jun 16, 2006, at 9:40 AM, Kevin Walzer wrote:

> This is a new twist on an old problem.
>
> I'm trying to build a standard Unix version of Python (without
> - -enable-framework) and link it against an X11-based version of  
> Tcl/Tk.
> However, no matter what I do, it builds against the system-installed
> Tk/Aqua.
>
> Googling for some solutions to this problem has turned up lots of
> complaints about Python linking against an X11 version of Tk (usually
> Fink's). How far we've come! :-)
>
> Anyway, here are the flags I'm using to run the build:
>
> export CFLAGS="-arch ppc -arch i386 -isysroot
> /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
> - -I/usr/local/tcl-tk-unix/include"
>
> export LDFLAGS="-L/usr/local/tcl-tk-unix/lib"
>
>
> ./configure --prefix=/usr/local/python-unix --enable-threads
>
> I know it would be simple to use a Fink or DarwinPorts version of
> Python, but I want this version to link against the universal X11  
> build
> of Tcl/Tk I have installed.
>
> Any advice?

Edit setup.py, remove the "if platform == 'darwin':  
self.detect_tkinter_darwin..."

-bob

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app crash if path contains a colon

2006-06-16 Thread Ronald Oussoren

On 15-jun-2006, at 23:21, Bob Ippolito wrote:

>
> On Jun 15, 2006, at 2:12 PM, Bob Ippolito wrote:
>
>> FWIW, this isn't at all Mac OS X specific..
>>
>> $ uname -rs && pwd && ./python -c "import sys; print sys.path"
>> FreeBSD 6.0-RELEASE
>> /usr/home/bob/src/python/:colon
>> 'import site' failed; use -v for traceback
>> ['', '/usr/local/lib/python25.zip', '/usr/home/bob/src/python/',
>> 'colon/../Lib/', '/usr/home/bob/src/python/', 'colon/../Lib/plat-
>> freebsd6', '/usr/home/bob/src/python/', 'colon/../Lib/lib-tk', '/usr/
>> home/bob/src/python/', 'colon/Modules']
>>
>> The issue is of course that all this code is happening in C and
>> expecting ':' as the delimiter. Modules/getpath.c probably should be
>> refactored to use PyObject* ASAP, rather than doing it last.
>
> Well, it looks like that's not such a good idea either, because
> Py_GetPath() is called before Python's fully initialized. Any
> exception would probably make the interpreter explode. Hmm :)

The most prudent thing to do right now is to file a bug at python's  
SF tracker and let someone else worry about this ;-).

Wouldn't it be possible to set up the right sys.path in py2app's  
application stub to work around this issue?

Ronald

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app crash if path contains a colon

2006-06-16 Thread Bob Ippolito

On Jun 16, 2006, at 12:21 AM, Ronald Oussoren wrote:

>
> On 15-jun-2006, at 23:21, Bob Ippolito wrote:
>
>>
>> On Jun 15, 2006, at 2:12 PM, Bob Ippolito wrote:
>>
>>> FWIW, this isn't at all Mac OS X specific..
>>>
>>> $ uname -rs && pwd && ./python -c "import sys; print sys.path"
>>> FreeBSD 6.0-RELEASE
>>> /usr/home/bob/src/python/:colon
>>> 'import site' failed; use -v for traceback
>>> ['', '/usr/local/lib/python25.zip', '/usr/home/bob/src/python/',
>>> 'colon/../Lib/', '/usr/home/bob/src/python/', 'colon/../Lib/plat-
>>> freebsd6', '/usr/home/bob/src/python/', 'colon/../Lib/lib-tk', '/ 
>>> usr/
>>> home/bob/src/python/', 'colon/Modules']
>>>
>>> The issue is of course that all this code is happening in C and
>>> expecting ':' as the delimiter. Modules/getpath.c probably should be
>>> refactored to use PyObject* ASAP, rather than doing it last.
>>
>> Well, it looks like that's not such a good idea either, because
>> Py_GetPath() is called before Python's fully initialized. Any
>> exception would probably make the interpreter explode. Hmm :)
>
> The most prudent thing to do right now is to file a bug at python's
> SF tracker and let someone else worry about this ;-).
>
> Wouldn't it be possible to set up the right sys.path in py2app's
> application stub to work around this issue?

Maybe in the C part of the code.. by the time any Python code  
executes it's already failed to load site.

-bob

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig