[pywin32-checkins] pywin32 setup_win32all_core.py,1.16,1.17
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: <mha...@us...> - 2003-11-11 08:29:05
|
Update of /cvsroot/pywin32/pywin32
In directory sc8-pr-cvs1:/tmp/cvs-serv3964
Modified Files:
setup_win32all_core.py
Log Message:
* Reinstate environ["LIB"] check - I'm not sure what I saw, but not
what I thought I saw.
* Pass /SUBSYSTEM when linking pythonwin.
* Enable PCH for certain projects - this halves the build time when
starting from scratch!
Index: setup_win32all_core.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/setup_win32all_core.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** setup_win32all_core.py 11 Nov 2003 07:38:25 -0000 1.16
--- setup_win32all_core.py 11 Nov 2003 08:29:02 -0000 1.17
***************
*** 36,39 ****
--- 36,40 ----
export_symbol_file=None,
dsp_file=None,
+ pch_header=None
):
assert dsp_file or sources, "Either dsp_file or sources must be specified"
***************
*** 51,54 ****
--- 52,56 ----
sources.extend(self.get_source_files(dsp_file))
+ self.pch_header = pch_header
Extension.__init__ (self, name, sources,
include_dirs,
***************
*** 148,155 ****
def _why_cant_build_extension(self, ext):
# Return None, or a reason it can't be built.
for lib in ext.libraries:
if self.found_libraries.has_key(lib.lower()):
continue
! for dir in self.compiler.library_dirs + ext.library_dirs:
if os.path.isfile(os.path.join(dir, lib + ".lib")):
self.found_libraries[lib.lower()] = True
--- 150,159 ----
def _why_cant_build_extension(self, ext):
# Return None, or a reason it can't be built.
+ common_dirs = self.compiler.library_dirs
+ common_dirs += os.environ.get("LIB").split(os.pathsep)
for lib in ext.libraries:
if self.found_libraries.has_key(lib.lower()):
continue
! for dir in common_dirs + ext.library_dirs:
if os.path.isfile(os.path.join(dir, lib + ".lib")):
self.found_libraries[lib.lower()] = True
***************
*** 305,308 ****
--- 309,316 ----
return
+ if not self.mingw32 and ext.pch_header:
+ ext.extra_compile_args = ext.extra_compile_args or []
+ ext.extra_compile_args.append("/YX"+ext.pch_header)
+
# some source files are compiled for different extensions
# with special defines. So we cannot use a shared
***************
*** 411,414 ****
--- 419,423 ----
extra_compile_args = ['-DBUILD_PYWINTYPES'],
libraries = "advapi32 user32 ole32 oleaut32",
+ pch_header = "PyWinTypes.h",
)
***************
*** 478,496 ****
export_symbol_file = 'com/win32com/src/PythonCOM.def',
extra_compile_args = ['-DBUILD_PYTHONCOM'],
)
com_extensions = [pythoncom]
com_extensions += [
WinExt_win32com('adsi', libraries="ACTIVEDS ADSIID"),
! WinExt_win32com('axcontrol'),
WinExt_win32com('axscript',
dsp_file=r"com\Active Scripting.dsp",
extra_compile_args = ['-DPY_BUILD_AXSCRIPT'],
),
WinExt_win32com('axdebug',
dsp_file=r"com\Active Debugging.dsp",
libraries="axscript msdbg",
),
WinExt_win32com('internet'),
! WinExt_win32com('mapi', libraries="mapi32"),
WinExt_win32com_mapi('exchange',
libraries="""MBLOGON ADDRLKUP mapi32 exchinst
--- 487,508 ----
export_symbol_file = 'com/win32com/src/PythonCOM.def',
extra_compile_args = ['-DBUILD_PYTHONCOM'],
+ pch_header = "stdafx.h",
)
com_extensions = [pythoncom]
com_extensions += [
WinExt_win32com('adsi', libraries="ACTIVEDS ADSIID"),
! WinExt_win32com('axcontrol', pch_header="axcontrol_pch.h"),
WinExt_win32com('axscript',
dsp_file=r"com\Active Scripting.dsp",
extra_compile_args = ['-DPY_BUILD_AXSCRIPT'],
+ pch_header = "stdafx.h"
),
WinExt_win32com('axdebug',
dsp_file=r"com\Active Debugging.dsp",
libraries="axscript msdbg",
+ pch_header = "stdafx.h",
),
WinExt_win32com('internet'),
! WinExt_win32com('mapi', libraries="mapi32", pch_header="PythonCOM.h"),
WinExt_win32com_mapi('exchange',
libraries="""MBLOGON ADDRLKUP mapi32 exchinst
***************
*** 502,514 ****
EDKMAPI mapi32 version""",
extra_link_args=["/nodefaultlib:libc"]),
! WinExt_win32com('shell', libraries='shell32')
]
pythonwin_extensions = [
! WinExt_pythonwin("win32ui",
! extra_compile_args =
! ['-DBUILD_PYW']),
WinExt_pythonwin("win32uiole"),
! WinExt_pythonwin("dde"),
]
--- 514,525 ----
EDKMAPI mapi32 version""",
extra_link_args=["/nodefaultlib:libc"]),
! WinExt_win32com('shell', libraries='shell32', pch_header="shell_pch.h")
]
pythonwin_extensions = [
! WinExt_pythonwin("win32ui", extra_compile_args = ['-DBUILD_PYW'],
! pch_header = "stdafx.h"),
WinExt_pythonwin("win32uiole"),
! WinExt_pythonwin("dde", pch_header="stdafxdde.h"),
]
***************
*** 516,521 ****
WinExt_win32("win32popenWin9x",
libraries = "user32"),
! WinExt_pythonwin("Pythonwin"),
! ## extra_compile_args = ['-D_WINDOWS', '-D_AFXDLL', '-D_MBCS']),
]
################################################################
--- 527,531 ----
WinExt_win32("win32popenWin9x",
libraries = "user32"),
! WinExt_pythonwin("Pythonwin", extra_link_args=["/SUBSYSTEM:WINDOWS"]),
]
################################################################
|