[PySide] cmake OS X setup.py pyside-tools

Christian Tismer tismer at stackless.com
Fri Nov 23 01:55:49 CET 2012


Hi,

solved this issue.

On 22.11.12 00:08, Christian Tismer wrote:
> Hi again,
>
> while testing Matt's setup.py on a standard Qt 4.8.3 install
> (which works great on a fresh Mountain Lion), I encountered
> another quirk:
>
> When building with a used developer machine (a pyside 1.1.0 was still
> lingering around in the system Python), this happens:
>
> After building for a long time, pyside-tools gets compiled, and that
> crashes, because cmake now finds pyside 1.1.0 .
>
> I compared the CMakeCache.txt files to find that out.
> The reason is simple:
> The macro CMakeLists.txt simply checks
>
>       find_package(PySide 1.0.6 REQUIRED)
>
> which is not a really good idea:
> After building pyside correctly, this is also the pyside that we
> want to build pyside-tools for, not anything that happens to be
> installed elsewhere.
>
> I'm wondering how this should be fixed:
> In the case of building pyside-tools right after pyside, things are
> clear: the built version should be used.
>
> But in the general case (building pyside-tools alone, it gets
> more tricky. It is not neccessarily the same python that builds
> as the one that installs, right?
>
> Do you think it would be sufficient to patch pyside-tools/CMakeLists.txt
> simply to require the exact version that was just built, or that is
> installed in site-packages?
>
> What would be "the right thing (TM)" ?
>
> cheers - chris
>

pyside-tools is not configured correctly and contradicts the settings
in setup.py. I think the following changes are necessary:

> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 1d609d7..9fa3169 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 2.6)
>  project(pyside-tools)
>
>  find_package(PythonInterp REQUIRED)
> -find_package(Qt4 4.5.0 REQUIRED)
> -find_package(PySide 1.0.6 REQUIRED)
> +find_package(Qt4 4.6.0 REQUIRED)
> +find_package(PySide 1.1.1 REQUIRED)
>
>  set(pyside_tools_MAJOR_VERSION "0")
>  set(pyside_tools_MINOR_VERSION "2")

-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
Software Consulting          :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* http://starship.python.net/
14482 Potsdam                :     PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776  fax +49 (30) 700143-0023
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
       whom do you want to sponsor today?   http://www.stackless.com/




More information about the PySide mailing list