summaryrefslogtreecommitdiffstats
path: root/Tools/freeze/checkextensions_win32.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-07-13 15:45:17 (GMT)
committerGuido van Rossum <guido@python.org>2000-07-13 15:45:17 (GMT)
commitf67c2383da573ecc1a774b61d382ca445d73d37c (patch)
tree5e6fc6d073e4e651fe09246233add80450a60c1f /Tools/freeze/checkextensions_win32.py
parent5e70cfe22fb4df86c6a3af887148ee6b96d59bc9 (diff)
downloadcpython-f67c2383da573ecc1a774b61d382ca445d73d37c.zip
cpython-f67c2383da573ecc1a774b61d382ca445d73d37c.tar.gz
cpython-f67c2383da573ecc1a774b61d382ca445d73d37c.tar.bz2
Patch by Toby Dickenson, mentored by Mark Hammond, to support
automatically finding (most of) the standard PYD extensions, and to remove the hardcoded Python version.
Diffstat (limited to 'Tools/freeze/checkextensions_win32.py')
-rw-r--r--Tools/freeze/checkextensions_win32.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Tools/freeze/checkextensions_win32.py b/Tools/freeze/checkextensions_win32.py
index e3efe05..e90bdab 100644
--- a/Tools/freeze/checkextensions_win32.py
+++ b/Tools/freeze/checkextensions_win32.py
@@ -54,7 +54,7 @@ class CExtension:
def GetLinkerLibs(self):
return self.linkerLibs
-def checkextensions(unknown, extra_inis):
+def checkextensions(unknown, extra_inis, prefix):
# Create a table of frozen extensions
defaultMapName = os.path.join( os.path.split(sys.argv[0])[0], "extensions_win32.ini")
@@ -68,7 +68,7 @@ def checkextensions(unknown, extra_inis):
for mod in unknown:
for ini in extra_inis:
# print "Looking for", mod, "in", win32api.GetFullPathName(ini),"...",
- defn = get_extension_defn( mod, ini )
+ defn = get_extension_defn( mod, ini, prefix )
if defn is not None:
# print "Yay - found it!"
ret.append( defn )
@@ -79,8 +79,9 @@ def checkextensions(unknown, extra_inis):
return ret
-def get_extension_defn(moduleName, mapFileName):
+def get_extension_defn(moduleName, mapFileName, prefix):
if win32api is None: return None
+ os.environ['PYTHONPREFIX'] = prefix
dsp = win32api.GetProfileVal(moduleName, "dsp", "", mapFileName)
if dsp=="":
return None