Re: [Qgis-user] [Qgis-developer] Python build problem on OSX

2007-12-19 Thread William Kyngesburye
On Dec 19, 2007, at 4:13 AM, Martin Dobias wrote:

> I know that the way how the compilation of PyQGIS works now isn't
> optimal at all, however I wasn't able to figure out any better
> solution. Python modules sipconfig and pyqtconfig do all the hard work
> detecting correct parameters for compilation for all supported
> platforms/compilers.
>
> Looking at sipconfig I see it supports universal builds - try this:
> in configure.py.in add argument universal='/Developer/SDKs/ 
> MacOSX10.4u.sdk'
> to sipconfig.ModuleMakefile() constructor - when creating variables
> makefile_core and makefile_gui
> It should do exactly the same as Tom has written manually to  
> makefiles...
>
> Martin

I thought it might be something there.  Thanks.

Is it possible for the python cmakelists to see that a user specified - 
D CMAKE_OSX_ARCHITECTURES="ppc;i386" -D CMAKE_OSX_SYSROOT=whatever and  
add the universal option automatically (reusing CMAKE_OSX_SYSROOT and  
not just blindly forcing the 10.4u SDK)?


-
William Kyngesburye 
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy


___
Qgis-user mailing list
Qgis-user@lists.qgis.org
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user


Re: [Qgis-user] [Qgis-developer] Python build problem on OSX

2007-12-19 Thread Martin Dobias
On Dec 19, 2007 6:48 AM, Tom Elwertowski <[EMAIL PROTECTED]> wrote:
> William Kyngesburye wrote:
> > I found a build problem (unnoticed back in 0.9.0) with the Python
> > support on OSX - it will NOT build universal, or with an SDK (which
> > means I can't build *on* Leopard *for* Tiger, due to some library
> > version incompatibilities).
>
> [...]
>
> The problem is that the QGIS Python modules are completely managed by a
> Python script. If the generated files were directly compiled by CMake,
> the problem would disappear. This would also solve the problem of all
> C++ files being regenerated and recompiled whenever any file, not just
> those which have a modified Python binding, is modified. It would make
> more sense to me if each sipxxx.cpp depended upon xxx.sip and Python was
> invoked only to generate the .cpp file leaving CMake to take care of
> compiling and linking C++ files.

I know that the way how the compilation of PyQGIS works now isn't
optimal at all, however I wasn't able to figure out any better
solution. Python modules sipconfig and pyqtconfig do all the hard work
detecting correct parameters for compilation for all supported
platforms/compilers.

Looking at sipconfig I see it supports universal builds - try this:
in configure.py.in add argument universal='/Developer/SDKs/MacOSX10.4u.sdk'
to sipconfig.ModuleMakefile() constructor - when creating variables
makefile_core and makefile_gui
It should do exactly the same as Tom has written manually to makefiles...

Martin
___
Qgis-user mailing list
Qgis-user@lists.qgis.org
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user


Re: [Qgis-user] [Qgis-developer] Python build problem on OSX

2007-12-18 Thread Tom Elwertowski
William Kyngesburye wrote:
> I found a build problem (unnoticed back in 0.9.0) with the Python  
> support on OSX - it will NOT build universal, or with an SDK (which  
> means I can't build *on* Leopard *for* Tiger, due to some library  
> version incompatibilities).

I work around the problem by editing the two generated Makefiles in 
build/python/core and build/python/gui after the C++ generation step is 
finished.

To CFLAGS and CXXFLAGS add
-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc

To LFLAGS add
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc

This can be done after the build is done or you can interrupt the build 
as soon as you see the message that it's starting compilation of 
core.so. I also delete any .o in the two directories. Running 'make' 
again will (re)build Universal modules.

The problem is that the QGIS Python modules are completely managed by a 
Python script. If the generated files were directly compiled by CMake, 
the problem would disappear. This would also solve the problem of all 
C++ files being regenerated and recompiled whenever any file, not just 
those which have a modified Python binding, is modified. It would make 
more sense to me if each sipxxx.cpp depended upon xxx.sip and Python was 
invoked only to generate the .cpp file leaving CMake to take care of 
compiling and linking C++ files.

Tom

___
Qgis-user mailing list
Qgis-user@lists.qgis.org
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user