[pygtk] pyGTK for Darwin/MacOSX (another case-blind gotcha!)

James Henstridge james at daa.com.au
Fri Oct 13 21:18:02 EDT 2000


On Fri, 13 Oct 2000, Steven D. Majewski wrote:

> 
> I managed to get pygtk working on MacOSX PB under X11 
> (and it should work under the open-source Darwin install)

cool.

> 
> glib & gtk needed to use -traditional-cpp to build.
> 
> 
> The final link of pygtk needed some manual coaxing - it took 
> the list of libraries from the Makefile command and combined it
> with the link switches that was working for the build of the other
> Python shared modules, and got:
> 
> 
> cc -bundle -undefined warning gtkmodule.o  -L/usr/local/lib 
> -L/usr/X11R6/lib -lgtk -lgdk -lgmodule -lgthread -lglib -lXext  -lX11    
> .libs/lib_gtkmodule.a   -o _gtkmodule.so

The shared library linking problems should probably be fixed by adding
Darwin support to libtool.  This would also allow other libraries to be
built easily under Darwin.

> 
> 
> HFS+ file systems are case preserving but case blind on comparisons,
> os it can't distinguish between "GTK.py" and "gtk.py" . Only one
> of them (GTK.py) ended up in the distribution directory. I extracted
> the missing one into another directory and concatenated them both
> into the same file. This seemed to work well enough to get most of
> the examples to work. ( "import GTK" and "import gtk" both work 
> but resolve to the same module. This may not work in the future. ) 

Unfortunately, things will have to stay this way in the short term as I
don't want to break compatibility.  However, with the rewrite for
gtk+-2.0, I have rearranged most of the pygtk stuff into a package, and
there is no modules that differ only in case.

> 
>   Files that differ only by case are a problem on other systems 
> (MS-windows and Classis MacOS) - so I would suggest that the 
> permanent solution should be that one of those files be renamed. 
> ( And that this sort of nameing scheme ought to be discouraged as
>  non-portable. ) 

And it will be fixed.

James.

-- 
Email: james at daa.com.au
WWW:   http://www.daa.com.au/~james/






More information about the Python-list mailing list