bug 661908 - create a virtualenv as part of configure. r=khuey

--HG--
extra : rebase_source : c0d8d3a37a03425cdb3c0713ceda3007bddb1496
This commit is contained in:
Ted Mielczarek 2012-04-25 13:37:16 -04:00
parent ee0f7c93b8
commit 07414e5f89
4 changed files with 41 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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} \

View File

@ -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)