summaryrefslogtreecommitdiff
path: root/PCbuild
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-02-29 18:54:45 +0000
committerMartin v. Löwis <martin@v.loewis.de>2008-02-29 18:54:45 +0000
commitdb3d55a4092882d7e986ba4e86870ac97ad83fef (patch)
tree2262ae080cb16df8e5b44e1b869e2c57896d3d53 /PCbuild
parent16ee14a4971dd029e812cd349acd6442604b08c7 (diff)
downloadcpython-db3d55a4092882d7e986ba4e86870ac97ad83fef.tar.gz
Port build_ssl.py to 2.4; support HOST_PYTHON variable
Diffstat (limited to 'PCbuild')
-rw-r--r--PCbuild/build_ssl.py16
-rw-r--r--PCbuild/readme.txt3
-rw-r--r--PCbuild/x64.vsprops4
3 files changed, 18 insertions, 5 deletions
diff --git a/PCbuild/build_ssl.py b/PCbuild/build_ssl.py
index 2ccceec080..f24c9068ae 100644
--- a/PCbuild/build_ssl.py
+++ b/PCbuild/build_ssl.py
@@ -102,8 +102,11 @@ def create_makefile64(makefile, m32):
"""
if not os.path.isfile(m32):
return
- with open(m32) as fin:
- with open(makefile, 'w') as fout:
+ # 2.4 compatibility
+ fin = open(m32)
+ if 1: # with open(m32) as fin:
+ fout = open(makefile, 'w')
+ if 1: # with open(makefile, 'w') as fout:
for line in fin:
line = line.replace("=tmp32", "=tmp64")
line = line.replace("=out32", "=out64")
@@ -121,9 +124,13 @@ def fix_makefile(makefile):
"""
if not os.path.isfile(makefile):
return
- with open(makefile) as fin:
+ # 2.4 compatibility
+ fin = open(makefile)
+ if 1: # with open(makefile) as fin:
lines = fin.readlines()
- with open(makefile, 'w') as fout:
+ fin.close()
+ fout = open(makefile, 'w')
+ if 1: # with open(makefile, 'w') as fout:
for line in lines:
if line.startswith("PERL="):
continue
@@ -139,6 +146,7 @@ def fix_makefile(makefile):
line = line + noalgo
line = line + '\n'
fout.write(line)
+ fout.close()
def run_configure(configure, do_script):
print("perl Configure "+configure)
diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt
index f8b3f65062..4d2f9b6173 100644
--- a/PCbuild/readme.txt
+++ b/PCbuild/readme.txt
@@ -303,7 +303,8 @@ Building for AMD64
------------------
The build process for AMD64 / x64 is very similar to standard builds. You just
-have to set x64 as platform.
+have to set x64 as platform. In addition, the HOST_PYTHON environment variable
+must point to a Python interpreter (at least 2.4), to support cross-compilation.
Building Python Using the free MS Toolkit Compiler
--------------------------------------------------
diff --git a/PCbuild/x64.vsprops b/PCbuild/x64.vsprops
index c7eabbea46..07200842d3 100644
--- a/PCbuild/x64.vsprops
+++ b/PCbuild/x64.vsprops
@@ -15,4 +15,8 @@
Name="VCLinkerTool"
TargetMachine="17"
/>
+ <UserMacro
+ Name="PythonExe"
+ Value="$(HOST_PYTHON)"
+ />
</VisualStudioPropertySheet>