[pywin32-checkins] pywin32 setup_win32all.py,1.9,1.10
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <mha...@us...> - 2004-01-22 04:53:40
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1:/tmp/cvs-serv8930 Modified Files: setup_win32all.py Log Message: Attempt to make things work with VC7 and the Exchange SDK (where all the library names change, and where the SDK doesn't register in LIB or INCLUDE. Also add some .py files that were missing from the install. Index: setup_win32all.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup_win32all.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** setup_win32all.py 20 Jan 2004 03:01:33 -0000 1.9 --- setup_win32all.py 22 Jan 2004 04:53:37 -0000 1.10 *************** *** 50,53 **** --- 50,54 ---- import os, string, sys import re + import _winreg # Python 2.2 has no True/False *************** *** 184,191 **** return "win32comext/" + self.name ! # 'win32com.mapi.exchange' and 'win32com.mapi.exchdapi' currently only ! # ones with this special requirement class WinExt_win32com_mapi(WinExt_win32com): def get_pywin32_dir(self): return "win32comext/mapi" --- 185,227 ---- return "win32comext/" + self.name ! # Exchange extensions get special treatment: ! # * Look for the Exchange SDK in the registry. ! # * Output directory is different than the module's basename. class WinExt_win32com_mapi(WinExt_win32com): + def __init__ (self, name, **kw): + # The Exchange 2000 SDK seems to install itself without updating + # LIB or INCLUDE environment variables. It does register the core + # directory in the registry tho - look it up + sdk_install_dir = None + libs = kw.get("libraries", "") + keyname = "SOFTWARE\Microsoft\Exchange\SDK" + for root in _winreg.HKEY_LOCAL_MACHINE, _winreg.HKEY_CURRENT_USER: + try: + keyob = _winreg.OpenKey(root, keyname) + value, type_id = _winreg.QueryValueEx(keyob, "INSTALLDIR") + if type_id == _winreg.REG_SZ: + sdk_install_dir = value + break + except WindowsError: + pass + if sdk_install_dir is not None: + d = os.path.join(sdk_install_dir, "SDK", "Include") + if os.path.isdir(d): + kw.setdefault("include_dirs", []).insert(0, d) + d = os.path.join(sdk_install_dir, "SDK", "Lib") + if os.path.isdir(d): + kw.setdefault("library_dirs", []).insert(0, d) + # The stand-alone exchange SDK has these libs + libs += " Ex2KSdk sadapi mapi32 netapi32" + else: + # The MSVC6 included exchange SDK has these libs + libs += """ MBLOGON ADDRLKUP mapi32 exchinst + EDKCFG EDKUTILS EDKMAPI ACLCLS""" + kw["libraries"] = libs + WinExt_win32com.__init__(self, name, **kw) + def get_pywin32_dir(self): + # 'win32com.mapi.exchange' and 'win32com.mapi.exchdapi' currently only + # ones with this special requirement return "win32comext/mapi" *************** *** 679,687 **** WinExt_win32com('mapi', libraries="mapi32", pch_header="PythonCOM.h"), WinExt_win32com_mapi('exchange', ! libraries="""MBLOGON ADDRLKUP mapi32 exchinst ! EDKCFG EDKUTILS EDKMAPI ! ACLCLS version""", extra_link_args=["/nodefaultlib:libc"]), WinExt_win32com_mapi('exchdapi', libraries="""DAPI ADDRLKUP exchinst EDKCFG EDKUTILS EDKMAPI mapi32 version""", --- 715,722 ---- WinExt_win32com('mapi', libraries="mapi32", pch_header="PythonCOM.h"), WinExt_win32com_mapi('exchange', ! libraries="""version""", extra_link_args=["/nodefaultlib:libc"]), WinExt_win32com_mapi('exchdapi', + # This still needs work for vs.net. libraries="""DAPI ADDRLKUP exchinst EDKCFG EDKUTILS EDKMAPI mapi32 version""", *************** *** 858,861 **** --- 893,899 ---- 'pythonwin/license.txt', 'win32/license.txt', + 'win32/scripts/*.py', + 'win32/scripts/VersionStamp/*.py', + 'win32/test/*.py', 'com/win32com/readme.htm', # win32com test utility files. *************** *** 869,872 **** --- 907,911 ---- 'com/win32com/HTML/image/*', # Active Scripting test and demos. + 'com/win32comext/axscript/test/*.py', 'com/win32comext/axscript/test/*.vbs', 'com/win32comext/axscript/test/*.pys', |