Hi,
I have done all this with success for Python 2.6.6, but I have never
tried it out with Python 2.7.1, but this gave me a chance to test it
out. Here are my findings:
This is what I do when compiling a custom PySide 1.0.0 against my custom
Qt 4.7.2 and my custom Python 2.7.1
Environment:
Windows 7
Visual Studio 2008
cmake 2.8.4 added to path
All files on e:\project\somesubdir
OpenSSL in e:\projects\OpenSSL-Win32
Python 2.7.1 installed in c:\python27 and added to path
Visual Studio 2008 command prompt to run all the command in
Python 2.7.1 I do:
- download sources to e:\projects\python\Python-2.7.1 and all the
dependencies in the directories below.
- I build using the PCBuild and the sln that comes with it for
debug and release
Qt 4.7.2 I do:
- download sources to e:\projects\qt\qt472
- set environment QTDIR = e:\projects\qt\qt472
- add to path %QTDIR%\bin
- configure.exe -debug-and-release -platform win32-msvc2008 -webkit
-openssl -I E:\Projects\OpenSSL-Win32\Include -L
E:\Projects\OpenSSL-Win32\Lib
- then build a debug and release in VS2008 using the sln file
PySide 1.0.0 I do:
- download all the source and extract them to e:\projects\pyside
- make sure you have installed a binary version of Python 2.7.1 and
that it is found in path if you don't it do not build properly in
debug. It seams like a problem with cmake finding the proper include
file for Python custom build (at least I did not get it to work when I
only had Python 2.6.6 installed in c:\python26
I use the following bat file to build PySide debug and release to
E:\projects\PySide\PySideInstall:
SET PYTHONDIR=E:\Projects\Python\Python-2.7.1\PCbuild\
SET PYTHONVER=27
SET PYSIDEINSTALLDIR=E:\Projects\PySide\PySideInstall\
SET PSINSTALLD=%PYSIDEINSTALLDIR%Debug
SET PSINSTALLR=%PYSIDEINSTALLDIR%Release
SET APIEXTRACTORDIR=E:\Projects\PySide\apiextractor-head
SET GENERATORRUNNERDIR=E:\Projects\PySide\generatorrunner-head
SET SHIBOKENDIR=E:\Projects\PySide\shiboken-head
SET PYSIDEDIR=E:\Projects\PySide\pyside-head
SET PYSIDETOOLSDIR=E:\Projects\PySide\pyside-tools-head
@echo make install dir
mkdir %PYSIDEINSTALLDIR%
@echo PySide build debug
mkdir %PSINSTALLD%
cd %APIEXTRACTORDIR%
mkdir builddebug
cd builddebug
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=FALSE
-DCMAKE_INSTALL_PREFIX="%PSINSTALLD%" ..
nmake install
cd %GENERATORRUNNERDIR%
mkdir builddebug
cd builddebug
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=FALSE
-DCMAKE_INSTALL_PREFIX="%PSINSTALLD%" ..
nmake install
cd %SHIBOKENDIR%
mkdir builddebug
cd builddebug
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=FALSE
-DPYTHON_EXECUTABLE="%PYTHONDIR%python_d.exe"
-DPYTHON_DEBUG_LIBRARY="%PYTHONDIR%python%PYTHONVER%_d.lib"
-DPYTHON_LIBRARY="%PYTHONDIR%python%PYTHONVER%_d.lib"
-DCMAKE_INSTALL_PREFIX="%PSINSTALLD%" ..
nmake install
cd %PYSIDEDIR%
mkdir builddebug
cd builddebug
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=FALSE
-DPYTHON_EXECUTABLE="%PYTHONDIR%python_d.exe"
-DPYTHON_DEBUG_LIBRARY="%PYTHONDIR%python%PYTHONVER%_d.lib"
-DCMAKE_INSTALL_PREFIX="%PSINSTALLD%" ..
nmake install
cd %PYSIDETOOLSDIR%
mkdir builddebug
cd builddebug
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=FALSE
-DCMAKE_INSTALL_PREFIX="%PSINSTALLD%" ..
nmake install
@echo PySide build release
mkdir %PSINSTALLR%
cd %APIEXTRACTORDIR%
mkdir buildrelease
cd buildrelease
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=FALSE
-DCMAKE_INSTALL_PREFIX="%PSINSTALLR%" ..
nmake install
cd %GENERATORRUNNERDIR%
mkdir buildrelease
cd buildrelease
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=FALSE
-DCMAKE_INSTALL_PREFIX="%PSINSTALLR%" ..
nmake install
cd %SHIBOKENDIR%
mkdir buildrelease
cd buildrelease
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=FALSE
-DPYTHON_EXECUTABLE="%PYTHONDIR%python.exe"
-DCMAKE_INSTALL_PREFIX="%PSINSTALLR%" ..
nmake install
cd %PYSIDEDIR%
mkdir buildrelease
cd buildrelease
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=FALSE
-DPYTHON_EXECUTABLE="%PYTHONDIR%python.exe"
-DCMAKE_INSTALL_PREFIX="%PSINSTALLR%" ..
nmake install
cd %PYSIDETOOLSDIR%
mkdir buildrelease
cd buildrelease
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=FALSE
-DCMAKE_INSTALL_PREFIX="%PSINSTALLR%" ..
nmake install
cd %PYSIDEINSTALLDIR%
When all is compiled I can copy the correct pyside versions from
PySideInstall\Release\lib\site-packages to my ditto in python. Then I
use the pyside_postinstall.py that I found in the binary install to
configigure my Qt and create a qt.conf file.
Hope it is of help,
Kind regards,
Bjorn Helge Kjosnes
@echo Done building PySide Debug and Release version
On 19.03.2011 14:47, Erik Janssens wrote:
Hi,
I'm trying to build PySide on Windows against a custom python 2.7 / QT 4.7.2
build.
Everything works fine upto building shiboken. However, the pyside build
failes at the CMAKE step, complaining about an unknown target : libpyside
I'm using the 1.0.0 release.
Any ideas ?
Thx,
Erik
INFO:bootstrap builder:executing : set PATH=C:\Program Files\Subversion\bin;C:\P
rogram Files\GnuWin32\bin;C:\Program Files\nasm;C:\cpd\win32\install\bin;%PATH%
& set LIB=%LIB%;C:\cpd\win32\install\lib& set
INCLUDE=%INCLUDE%;C:\cpd\win32\in
stall\include;& "C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkV
er.exe" -version:v7.1 -q& "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcva
rsall.bat" x86& "C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkV
er.exe" -version:v7.1 -q& C:\cpd\win32\cmake-2.8.2-win32-x86\bin\cmake.exe -G
"Visual Studio 9 2008" -DCMAKE_INSTALL_PREFIX=C:\cpd\win32\install -DPYTHON_EXEC
UTABLE=C:\cpd\win32\install\bin\python.exe -DQT_BINARY_DIR=C:\cpd\win32\install\
bin -DPYTHON_INCLUDE_DIR=C:\cpd\win32\install\include\python2.7 -DPYTHON_LIBRARY
=C:\cpd\win32\install\lib\python27.lib -DCMAKE_BUILD_TYPE=Release -DQT_LIBRARY_D
IR=C:\cpd\win32\install\lib -DQT_HEADERS_DIR=C:\cpd\win32\install\include
Setting environment for using Microsoft Visual Studio 2008 x86 tools.
The system cannot find the path specified.
-- Using default python: python2.7
-- libshiboken built for Release
-- Detected OS: win
-- PySide will be generated avoiding the protected hack!
-- QT_SRC_DIR variable not set or graphviz not found, apidoc generation targets
disabled.
-- Configuring done
-- Generating done
CMake Error: Unknown Target referenced : libpyside
CMake Error: Target: testbinding depends on unknown target: libpyside
CMake Error: Unknown Target referenced : libpyside
CMake Error: Target: testbinding depends on unknown target: libpyside
-- Build files have been written to: C:/cpd/win32/pyside-qt4.7+1.0.0
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside