mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
number of tests, all because of the codecs/_multibytecodecs issue described here (it's not a Py3K issue, just something Py3K discovers): http://mail.python.org/pipermail/python-dev/2006-April/064051.html Hye-Shik Chang promised to look for a fix, so no need to fix it here. The tests that are expected to break are: test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecs test_multibytecodec This merge fixes an actual test failure (test_weakref) in this branch, though, so I believe merging is the right thing to do anyway.
This commit is contained in:
parent
9ada3d6e29
commit
49fd7fa443
640 changed files with 52240 additions and 18408 deletions
|
@ -64,27 +64,21 @@ unpack into new subdirectories of dist\.
|
|||
|
||||
_tkinter
|
||||
Python wrapper for the Tk windowing system. Requires building
|
||||
Tcl/Tk first. Following are instructions for Tcl/Tk 8.4.7; these
|
||||
should work for version 8.4.6 too, with suitable substitutions:
|
||||
Tcl/Tk first. Following are instructions for Tcl/Tk 8.4.12.
|
||||
|
||||
Get source
|
||||
----------
|
||||
Go to
|
||||
http://prdownloads.sourceforge.net/tcl/
|
||||
and download
|
||||
tcl847-src.zip
|
||||
tk847-src.zip
|
||||
Unzip into
|
||||
dist\tcl8.4.7\
|
||||
dist\tk8.4.7\
|
||||
respectively.
|
||||
In the dist directory, run
|
||||
svn export http://svn.python.org/projects/external/tcl8.4.12
|
||||
svn export http://svn.python.org/projects/external/tk8.4.12
|
||||
svn export http://svn.python.org/projects/external/tix-8.4.0
|
||||
|
||||
Build Tcl first (done here w/ MSVC 7.1 on Windows XP)
|
||||
---------------
|
||||
Use "Start -> All Programs -> Microsoft Visual Studio .NET 2003
|
||||
-> Visual Studio .NET Tools -> Visual Studio .NET 2003 Command Prompt"
|
||||
to get a shell window with the correct environment settings
|
||||
cd dist\tcl8.4.7\win
|
||||
cd dist\tcl8.4.12\win
|
||||
nmake -f makefile.vc
|
||||
nmake -f makefile.vc INSTALLDIR=..\..\tcltk install
|
||||
|
||||
|
@ -99,9 +93,9 @@ _tkinter
|
|||
|
||||
Build Tk
|
||||
--------
|
||||
cd dist\tk8.4.7\win
|
||||
nmake -f makefile.vc TCLDIR=..\..\tcl8.4.7
|
||||
nmake -f makefile.vc TCLDIR=..\..\tcl8.4.7 INSTALLDIR=..\..\tcltk install
|
||||
cd dist\tk8.4.12\win
|
||||
nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12
|
||||
nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 INSTALLDIR=..\..\tcltk install
|
||||
|
||||
XXX Should we compile with OPTS=threads?
|
||||
|
||||
|
@ -109,7 +103,7 @@ _tkinter
|
|||
XXX directory. Is all of that really needed for Python use of Tcl/Tk?
|
||||
|
||||
Optional: run tests, via
|
||||
nmake -f makefile.vc TCLDIR=..\..\tcl8.4.7 test
|
||||
nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 test
|
||||
|
||||
On WinXP Pro, wholly up to date as of 30-Aug-2004:
|
||||
all.tcl: Total 8420 Passed 6826 Skipped 1581 Failed 13
|
||||
|
@ -118,12 +112,9 @@ _tkinter
|
|||
|
||||
Built Tix
|
||||
---------
|
||||
Download from http://prdownloads.sourceforge.net/tix/tix-8.1.4.tar.gz
|
||||
cd dist\tix-8.1.4
|
||||
[cygwin]patch -p1 < ..\..\python\PC\tix.diff
|
||||
cd win
|
||||
nmake -f makefile.vc
|
||||
nmake -f makefile.vc install
|
||||
cd dist\tix-8.4.0\win
|
||||
nmake -f python.mak
|
||||
nmake -f python.mak install
|
||||
|
||||
bz2
|
||||
Python wrapper for the libbz2 compression library. Homepage
|
||||
|
@ -223,23 +214,24 @@ _bsddb
|
|||
target ("Release IA64" for Itanium, "Release AMD64" for AMD64), e.g.
|
||||
devenv db-4.4.20\build_win32\Berkeley_DB.sln /build "Release AMD64" /project db_static /useenv
|
||||
|
||||
_sqlite3
|
||||
Python wrapper for SQLite library.
|
||||
|
||||
Get the source code through
|
||||
|
||||
svn export http://svn.python.org/projects/external/sqlite-source-3.3.4
|
||||
|
||||
To use the extension module in a Python build tree, copy sqlite3.dll into
|
||||
the PCbuild folder.
|
||||
|
||||
_ssl
|
||||
Python wrapper for the secure sockets library.
|
||||
|
||||
Get the latest source code for OpenSSL from
|
||||
http://www.openssl.org
|
||||
Get the source code through
|
||||
|
||||
You (probably) don't want the "engine" code. For example, get
|
||||
openssl-0.9.7d.tar.gz
|
||||
not
|
||||
openssl-engine-0.9.7d.tar.gz
|
||||
|
||||
(see #1233049 for using 0.9.8).
|
||||
Unpack into the "dist" directory, retaining the folder name from
|
||||
the archive - for example, the latest stable OpenSSL will install as
|
||||
dist/openssl-0.9.7d
|
||||
svn export http://svn.python.org/projects/external/openssl-0.9.8a
|
||||
|
||||
Alternatively, get the latest version from http://www.openssl.org.
|
||||
You can (theoretically) use any version of OpenSSL you like - the
|
||||
build process will automatically select the latest version.
|
||||
|
||||
|
@ -281,6 +273,143 @@ The build process for the ReleaseAMD64 configuration is very similar
|
|||
to the Itanium configuration; make sure you use the latest version of
|
||||
vsextcomp.
|
||||
|
||||
Building Python Using the free MS Toolkit Compiler
|
||||
--------------------------------------------------
|
||||
|
||||
The build process for Visual C++ can be used almost unchanged with the free MS
|
||||
Toolkit Compiler. This provides a way of building Python using freely
|
||||
available software.
|
||||
|
||||
Requirements
|
||||
|
||||
To build Python, the following tools are required:
|
||||
|
||||
* The Visual C++ Toolkit Compiler
|
||||
from http://msdn.microsoft.com/visualc/vctoolkit2003/
|
||||
* A recent Platform SDK
|
||||
from http://www.microsoft.com/downloads/details.aspx?FamilyID=484269e2-3b89-47e3-8eb7-1f2be6d7123a
|
||||
* The .NET 1.1 SDK
|
||||
from http://www.microsoft.com/downloads/details.aspx?FamilyID=9b3a2ca6-3647-4070-9f41-a333c6b9181d
|
||||
|
||||
[Does anyone have better URLs for the last 2 of these?]
|
||||
|
||||
The toolkit compiler is needed as it is an optimising compiler (the
|
||||
compiler supplied with the .NET SDK is a non-optimising version). The
|
||||
platform SDK is needed to provide the Windows header files and libraries
|
||||
(the Windows 2003 Server SP1 edition, typical install, is known to work -
|
||||
other configurations or versions are probably fine as well). The .NET 1.1
|
||||
SDK is needed because it contains a version of msvcrt.dll which links to
|
||||
the msvcr71.dll CRT. Note that the .NET 2.0 SDK is NOT acceptable, as it
|
||||
references msvcr80.dll.
|
||||
|
||||
All of the above items should be installed as normal.
|
||||
|
||||
If you intend to build the openssl (needed for the _ssl extension) you
|
||||
will need the C runtime sources installed as part of the platform SDK.
|
||||
|
||||
In addition, you will need Nant, available from
|
||||
http://nant.sourceforge.net. The 0.85 release candidate 3 version is known
|
||||
to work. This is the latest released version at the time of writing. Later
|
||||
"nightly build" versions are known NOT to work - it is not clear at
|
||||
present whether future released versions will work.
|
||||
|
||||
Setting up the environment
|
||||
|
||||
Start a platform SDK "build environment window" from the start menu. The
|
||||
"Windows XP 32-bit retail" version is known to work.
|
||||
|
||||
Add the following directories to your PATH:
|
||||
* The toolkit compiler directory
|
||||
* The SDK "Win64" binaries directory
|
||||
* The Nant directory
|
||||
Add to your INCLUDE environment variable:
|
||||
* The toolkit compiler INCLUDE directory
|
||||
Add to your LIB environment variable:
|
||||
* The toolkit compiler LIB directory
|
||||
* The .NET SDK Visual Studio 2003 VC7\lib directory
|
||||
|
||||
The following commands should set things up as you need them:
|
||||
|
||||
rem Set these values according to where you installed the software
|
||||
set TOOLKIT=C:\Program Files\Microsoft Visual C++ Toolkit 2003
|
||||
set SDK=C:\Program Files\Microsoft Platform SDK
|
||||
set NET=C:\Program Files\Microsoft Visual Studio .NET 2003
|
||||
set NANT=C:\Utils\Nant
|
||||
|
||||
set PATH=%TOOLKIT%\bin;%PATH%;%SDK%\Bin\win64;%NANT%\bin
|
||||
set INCLUDE=%TOOLKIT%\include;%INCLUDE%
|
||||
set LIB=%TOOLKIT%\lib;%NET%\VC7\lib;%LIB%
|
||||
|
||||
The "win64" directory from the SDK is added to supply executables such as
|
||||
"cvtres" and "lib", which are not available elsewhere. The versions in the
|
||||
"win64" directory are 32-bit programs, so they are fine to use here.
|
||||
|
||||
That's it. To build Python (the core only, no binary extensions which
|
||||
depend on external libraries) you just need to issue the command
|
||||
|
||||
nant -buildfile:python.build all
|
||||
|
||||
from within the PCBuild directory.
|
||||
|
||||
Extension modules
|
||||
|
||||
To build those extension modules which require external libraries
|
||||
(_tkinter, bz2, _bsddb, _sqlite3, _ssl) you can follow the instructions
|
||||
for the Visual Studio build above, with a few minor modifications. These
|
||||
instructions have only been tested using the sources in the Python
|
||||
subversion repository - building from original sources should work, but
|
||||
has not been tested.
|
||||
|
||||
For each extension module you wish to build, you should remove the
|
||||
associated include line from the excludeprojects section of pc.build.
|
||||
|
||||
The changes required are:
|
||||
|
||||
_tkinter
|
||||
The tix makefile (tix-8.4.0\win\makefile.vc) must be modified to
|
||||
remove references to TOOLS32. The relevant lines should be changed to
|
||||
read:
|
||||
cc32 = cl.exe
|
||||
link32 = link.exe
|
||||
include32 =
|
||||
The remainder of the build instructions will work as given.
|
||||
|
||||
bz2
|
||||
No changes are needed
|
||||
|
||||
_bsddb
|
||||
The file db.build should be copied from the Python PCBuild directory
|
||||
to the directory db-4.4.20\build_win32.
|
||||
|
||||
The file db_static.vcproj in db-4.4.20\build_win32 should be edited to
|
||||
remove the string "$(SolutionDir)" - this occurs in 2 places, only
|
||||
relevant for 64-bit builds. (The edit is required as otherwise, nant
|
||||
wants to read the solution file, which is not in a suitable form).
|
||||
|
||||
The bsddb library can then be build with the command
|
||||
nant -buildfile:db.build all
|
||||
run from the db-4.4.20\build_win32 directory.
|
||||
|
||||
_sqlite3
|
||||
No changes are needed. However, in order for the tests to succeed, a
|
||||
copy of sqlite3.dll must be downloaded, and placed alongside
|
||||
python.exe.
|
||||
|
||||
_ssl
|
||||
The documented build process works as written. However, it needs a
|
||||
copy of the file setargv.obj, which is not supplied in the platform
|
||||
SDK. However, the sources are available (in the crt source code). To
|
||||
build setargv.obj, proceed as follows:
|
||||
|
||||
Copy setargv.c, cruntime.h and internal.h from %SDK%\src\crt to a
|
||||
temporary directory.
|
||||
Compile using "cl /c /I. /MD /D_CRTBLD setargv.c"
|
||||
Copy the resulting setargv.obj to somewhere on your LIB environment
|
||||
(%SDK%\lib is a reasonable place).
|
||||
|
||||
With setargv.obj in place, the standard build process should work
|
||||
fine.
|
||||
|
||||
YOUR OWN EXTENSION DLLs
|
||||
-----------------------
|
||||
If you want to create your own extension module DLL, there's an example
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue