diff --git a/allmakefiles.sh b/allmakefiles.sh index 09161e50a0c..54023a6feeb 100755 --- a/allmakefiles.sh +++ b/allmakefiles.sh @@ -30,6 +30,7 @@ build/Makefile build/pgo/Makefile build/pgo/blueprint/Makefile build/pgo/js-input/Makefile +build/virtualenv/Makefile config/Makefile config/autoconf.mk config/nspr/Makefile diff --git a/build/virtualenv/Makefile.in b/build/virtualenv/Makefile.in new file mode 100644 index 00000000000..d050eaf7e97 --- /dev/null +++ b/build/virtualenv/Makefile.in @@ -0,0 +1,15 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at http://mozilla.org/MPL/2.0/. + +DEPTH = ../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +default:: +# install some packages + +include $(topsrcdir)/config/rules.mk diff --git a/configure.in b/configure.in index 45aad803396..8a63cc51ebb 100644 --- a/configure.in +++ b/configure.in @@ -7921,10 +7921,9 @@ else fi AC_SUBST(CL_INCLUDES_PREFIX) rm -f dummy-hello.c - _topsrcdirwin=`cd \`dirname $0\`; pwd -W` dnl cl.py provides dependency generation for MSVC - CC_WRAPPER="$PYTHON -O $_topsrcdirwin/build/cl.py" - CXX_WRAPPER="$PYTHON -O $_topsrcdirwin/build/cl.py" + CC_WRAPPER='$(PYTHON) -O $(topsrcdir)/build/cl.py' + CXX_WRAPPER='$(PYTHON) -O $(topsrcdir)/build/cl.py' COMPILER_DEPEND=1 fi fi @@ -8566,7 +8565,6 @@ AC_SUBST(MOZ_MAPINFO) AC_SUBST(MOZ_BROWSE_INFO) AC_SUBST(MOZ_TOOLS_DIR) AC_SUBST(WIN32_REDIST_DIR) -AC_SUBST(PYTHON) AC_SUBST(MAKENSISU) dnl Echo the CFLAGS to remove extra whitespace. @@ -8948,6 +8946,22 @@ AC_SUBST(MOZ_DEFINES) rm -f confdefs.h mv confdefs.h.save confdefs.h +dnl Create a virtualenv where we can install local Python packages +AC_MSG_RESULT([Creating Python virtualenv]) +rm -rf _virtualenv +mkdir -p _virtualenv +$PYTHON $_topsrcdir/other-licenses/virtualenv/virtualenv.py ./_virtualenv +case "$host_os" in +mingw*) + PYTHON=`pwd`/_virtualenv/Scripts/python.exe + ;; +*) + PYTHON=`pwd`/_virtualenv/bin/python + ;; +esac + +AC_SUBST(PYTHON) + dnl Load the list of Makefiles to generate. dnl To add new Makefiles, edit allmakefiles.sh. dnl allmakefiles.sh sets the variable, MAKEFILES. @@ -8971,6 +8985,10 @@ mv -f config/autoconf.mk config/autoconf.mk.orig 2> /dev/null AC_OUTPUT($MAKEFILES) +# Populate the virtualenv +AC_MSG_RESULT([Populating Python virtualenv]) +$MAKE -C build/virtualenv || exit 1 + # Generate a JSON config file for unittest harnesses etc to read # build configuration details from in a standardized way. OS_TARGET=${OS_TARGET} TARGET_CPU=${TARGET_CPU} MOZ_DEBUG=${MOZ_DEBUG} \ diff --git a/toolkit/crashreporter/tools/symbolstore.py b/toolkit/crashreporter/tools/symbolstore.py index 286089e81f6..9d2b705bf37 100755 --- a/toolkit/crashreporter/tools/symbolstore.py +++ b/toolkit/crashreporter/tools/symbolstore.py @@ -352,7 +352,10 @@ def GetVCSFilename(file, srcdirs): def GetPlatformSpecificDumper(**kwargs): """This function simply returns a instance of a subclass of Dumper that is appropriate for the current platform.""" + # Python 2.5 has a bug where platform.system() returns 'Microsoft'. + # Remove this when we no longer support Python 2.5. return {'Windows': Dumper_Win32, + 'Microsoft': Dumper_Win32, 'Linux': Dumper_Linux, 'Sunos5': Dumper_Solaris, 'Darwin': Dumper_Mac}[platform.system()](**kwargs)