mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Various fixes for the build on Windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -45,7 +45,6 @@ else:
|
||||
|
||||
class Configuration(object):
|
||||
|
||||
USE_SIP = False # Can we run sip?
|
||||
SIP = SIPdefault # Where is the sip binary?
|
||||
SIPINC = 'sip/siplib' # Use our local copy of sip.h
|
||||
SIPGEN = 'sip/gen' # Where the generated .sip files go
|
||||
|
||||
@@ -232,23 +232,7 @@ class MyUnixCCompiler(distutils.unixccompiler.UnixCCompiler):
|
||||
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
|
||||
extra_postargs)
|
||||
except DistutilsExecError, msg:
|
||||
raise CompileError, msg
|
||||
|
||||
def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra):
|
||||
m = distutils.ccompiler.CCompiler._setup_compile
|
||||
macros, objects, extra, pp_opts, build = \
|
||||
m(self, outdir, macros, incdirs, sources, depends, extra)
|
||||
|
||||
# Remove items from the build collection that don't need to be built
|
||||
# because their obj file is newer than the source fle and any other
|
||||
# dependencies.
|
||||
for obj in objects:
|
||||
src, ext = build[obj]
|
||||
if not newer_group([src] + depends, obj):
|
||||
del build[obj]
|
||||
|
||||
return macros, objects, extra, pp_opts, build
|
||||
|
||||
raise CompileError, msg
|
||||
|
||||
_orig_parse_makefile = distutils.sysconfig.parse_makefile
|
||||
def _parse_makefile(filename, g=None):
|
||||
@@ -271,6 +255,27 @@ distutils.unixccompiler._darwin_compiler = _darwin_compiler_fixup_24
|
||||
distutils.sysconfig.parse_makefile = _parse_makefile
|
||||
|
||||
|
||||
# Inject a little code into the CCompiler class that will check if the object
|
||||
# file is up to date with respect to its source file and any other
|
||||
# dependencies associated with the extentension. If so then it is removed from
|
||||
# the collection of files to build.
|
||||
_orig_setup_compile = distutils.ccompiler.CCompiler._setup_compile
|
||||
def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra):
|
||||
print 'hello'
|
||||
macros, objects, extra, pp_opts, build = \
|
||||
_orig_setup_compile(self, outdir, macros, incdirs, sources, depends, extra)
|
||||
|
||||
# Remove items from the build collection that don't need to be built
|
||||
# because their obj file is newer than the source fle and any other
|
||||
# dependencies.
|
||||
for obj in objects:
|
||||
src, ext = build[obj]
|
||||
if not newer_group([src] + depends, obj):
|
||||
del build[obj]
|
||||
return macros, objects, extra, pp_opts, build
|
||||
|
||||
distutils.ccompiler.CCompiler._setup_compile = _setup_compile
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Another hack-job for the CygwinCCompiler class, this time replacing
|
||||
# the _compile function with one that will pass the -I flags to windres.
|
||||
@@ -399,8 +404,6 @@ class etgsip_build_ext(build_ext):
|
||||
|
||||
def _sip_compile(self, sip_bin, source, sbf):
|
||||
cfg = Config()
|
||||
if not cfg.USE_SIP:
|
||||
return
|
||||
|
||||
other_opts = []
|
||||
base = os.path.basename(source)
|
||||
|
||||
Reference in New Issue
Block a user