This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: building python 2.6 with VC Express 2008 Beta2
Type: Stage:
Components: Build Versions: Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: christian.heimes, weck
Priority: normal Keywords: patch

Created on 2007-11-19 17:36 by weck, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
PCbuild9.zip weck, 2007-11-19 17:36
socketmodule.c.patch weck, 2007-11-19 17:39
tix8.4.2.patch weck, 2007-11-19 17:40
Messages (8)
msg57642 - (view) Author: zouguangxian (weck) Date: 2007-11-19 17:36
The PCbuild9.zip include solution and project files upgraded from 
PCbuild/PCbuild8 with some modification.





To build with such a configuration, the following libraries are needed.

wget http://prdownloads.sourceforge.net/tcl/tcl8.4.16-src.tar.gz
wget http://prdownloads.sourceforge.net/tcl/tk8.4.16-src.tar.gz
wget http://prdownloads.sourceforge.net/tix/Tix8.4.2-src.tar.gz
wget http://download.oracle.com/berkeley-db/db-4.6.21.tar.gz
wget http://www.bzip.org/1.0.4/bzip2-1.0.4.tar.gz
wget http://www.openssl.org/source/openssl-0.9.8g.tar.gz
wget http://www.sqlite.org/sqlite-source-3_5_2.zip

If your PCBuild is .......\dist\src\PCbuild\, 
1. unpack these libraries into new subdirectories of dist\. 
2. unpack PCbuild9.zip into dist\src\.
3. rename tix-8.4.2 to tix8.4.2, and apply tix8.4.2.patch in dist 
directory.
4. apply socketmodule.c.patch in dist\src directory.





Several tools are needed too.
1. VC Express 2008 beta2
wget http://go.microsoft.com/fwlink/?linkid=95599

2. Windows SDK 
Microsoft ? Windows Server? 2003 R2 Platform SDK 
http://www.microsoft.com/downloads/details.aspx?familyid=0BAF2B35-C656-
4969-ACE8-E4C0C0716ADB&displaylang=en
OR
Microsoft? Windows? Software Development Kit (SDK) for Windows Server 
code name “Longhorn” and .NET Framework 3.5
http://www.microsoft.com/downloads/details.aspx?FamilyID=58726aca-8d84-
4683-8959-be0038da7084&displaylang=en

3. mingw + msys(to build sqlite3)
http://sourceforge.net/projects/mingw/
these are necessary:
gcc-g++-3.4.5-20060117-1.tar.gz
gcc-core-3.4.5-20060117-1.tar.gz
mingw32-make-3.81-2.tar.gz
binutils-2.17.50-20060824-1.tar.gz
MSYS-1.0.10.exe

4. ml.exe
I extract it from VC Express 2005. ml.exe is included in MASM 8.0, but 
MASM8.0 can not be installed with VC express 2008, it just can be 
installed with VC Express 2005.





you can follow dist\src\PCbuild9\README.txt to build libraries and 
python, the order I recommend is :
0. Use "Start -> All Programs -> Visual C++ 9.0 Express Edition
         -> Visual Studio Tools ->Visual Studio 2008 Beta 2 Command 
Prompt"
    to get a shell window with the correct environment settings
1. tcl8.4.16
    cd dist\tcl8.4.16\win
    nmake -f makefile.vc
    nmake -f makefile.vc INSTALLDIR=..\..\tcltk install

2. tk8.4.16
    cd dist\tk8.4.16\win
    nmake -f makefile.vc TCLDIR=..\..\tcl8.4.16
    nmake -f makefile.vc TCLDIR=..\..\tcl8.4.16 INSTALLDIR=..\..\tcltk 
install

3. tix8.4.2
   cd dist\tix8.4.2\win
   set MSVCDIR = %VCINSTALLDIR%
   nmake -f python.mak
   nmake -f python.mak install

4. db-4.6.21
Open in VC Express, the .dsw need to be converted to .sln, just compile 
db_static in both Release x86 and Debug x86.

5. sqlite3
I recommend you to have a try on mingw + msys, it's very easy, just 
need to excute several command:
    ./configuration
    make
    make dll
    lib /DEF:sqlite3.def /MACHINE:IX86

If you are afraid of mingw+msys, You can get sqlite3.dll and sqlite3.h 
by
    svn export http://svn.python.org/projects/external/sqlite-source-
3.3.4 
but by this way, you need to change options in dist\src\PCbuild9
\pyproject.vsprops.

6. python2.6
Open dist\src\PCbuild9\pcbuild.sln in VC Express, compile all project 
in both Release win32 and Debug win32.
After you build, run build.bat to copy .pyd etc to PCbuild9:
    build.bat -c Release -p win32
    build.bat -c Debug -p win32

7. openssl-0.9.8g
Invoke build_ssl.pyp in dist\src\PCbuild9\. you need to copy .pyd 
and .lib from x86-temp-debug and x86-temp-release.

I am trying to have a test on the *fresh* built python26, I also plan 
to patch msi.py so that msi.py can make a productive installer, any 
suggest are welcome.
msg57643 - (view) Author: zouguangxian (weck) Date: 2007-11-19 17:39
patch of socketmodule.c.
msg57644 - (view) Author: zouguangxian (weck) Date: 2007-11-19 17:40
patch of tix8.4.2
msg57646 - (view) Author: zouguangxian (weck) Date: 2007-11-19 17:41
some one may have difficult in getting ml.exe, i upload it here.
msg57652 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-19 18:46
I've removed the ml.exe. Please do NOT upload copyright protected
material here. 

You should really coordinate your effort with us. :) I've already
created a PCbuild9 directory in the py3k source tree. Once it is
finished I'm going to backport it to 2.6. I'll have a look if I can use
some of your ideas.

My PCbuild9 directory builds all of the dependencies except of tcltk
automatically - including separate 64bit builds.
msg57671 - (view) Author: zouguangxian (weck) Date: 2007-11-19 23:45
hi tiran, thanks for your suggest. :-) what can i do in the next? it's 
my pleasure to contribute my effort to python. 

It's seems that directory configurations of Visual Studio 2005/Visual C 
Express 2008 are stored in 
C:\Documents and Settings\USERNAME\Local Settings\Application 
Data\Microsoft\VisualStudio\8.0\VCComponents.dat
or
C:\Documents and Settings\USERNAME\Local Settings\Application 
Data\Microsoft\VCExpress\9.0\VCComponents.dat
devenv.exe/VCExpress.exe must be run first, this file will be created 
automatically.


[VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories]
Include Dirs=$(VCInstallDir)include;$(VCInstallDir)
atlmfc\include;$(WindowsSdkDir)\include;$(FrameworkSDKDir)include
Reference Dirs=$(FrameworkDir)$(FrameworkVersion);$(VCInstallDir)
atlmfc\lib;$(VCInstallDir)lib
Library Dirs=$(VCInstallDir)lib;$(VCInstallDir)
atlmfc\lib;$(VCInstallDir)atlmfc\lib\i386;$(WindowsSdkDir)
\lib;$(FrameworkSDKDir)lib;$(VSInstallDir);$(VSInstallDir)lib
Source Dirs=$(VCInstallDir)atlmfc\src\mfc;$(VCInstallDir)
atlmfc\src\mfcm;$(VCInstallDir)atlmfc\src\atl;$(VCInstallDir)crt\src
Exclude Dirs=$(VCInstallDir)include;$(VCInstallDir)
atlmfc\include;$(WindowsSdkDir)\include;$(FrameworkSDKDir)
include;$(FrameworkDir)$(FrameworkVersion);$(VCInstallDir)
atlmfc\lib;$(VCInstallDir)lib
Path Dirs=$(VCInstallDir)bin;$(WindowsSdkDir)\bin;$(VSInstallDir)Common7
\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7
\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)
bin;$(FrameworkDir)$(FrameworkVersion);$(VSInstallDir);$(SystemRoot)
\SysWow64;$(FxCopDir);$(PATH)

SCons has done some work on detecting msvc compiler. :-)

msi.py should extract msvcrxx.dll from *Merge Modules* or *redist* 
directory.
msg57683 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-20 01:56
Have you studied my patch http://bugs.python.org/issue1455? I didn't
want to parse some files. Instead I used a much simpler approach in my
patch. I'm using the "vcvarsall.bat" to set up an environment and "set"
to read the new environment from stdout. It works like a charm and it
could even support cross compiling.
msg58872 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-12-20 13:14
The PCbuild9 directory works for 2.6 and 3.0.
History
Date User Action Args
2022-04-11 14:56:28adminsetgithub: 45806
2007-12-20 13:14:04christian.heimessetstatus: open -> closed
resolution: out of date
messages: + msg58872
2007-11-20 01:56:23christian.heimessetmessages: + msg57683
2007-11-19 23:45:19wecksetmessages: + msg57671
2007-11-19 18:46:38christian.heimessetpriority: normal
assignee: christian.heimes
messages: + msg57652
keywords: + patch
nosy: + christian.heimes
2007-11-19 18:42:02christian.heimessetfiles: - ml.exe
2007-11-19 17:41:57wecksetfiles: + ml.exe
messages: + msg57646
2007-11-19 17:40:13wecksetfiles: + tix8.4.2.patch
messages: + msg57644
2007-11-19 17:39:15wecksetfiles: + socketmodule.c.patch
messages: + msg57643
2007-11-19 17:36:52weckcreate