aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-08-27 15:12:41 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2013-09-01 19:14:49 +0400
commit1d984a67a95d88f3e708b077dab8adeb47c38c93 (patch)
tree78b9ef60ca7ae3a792d7778bb4b854b27e4c208d /configure
parent5b21a2ae4dea72d9aa68e0385fc0548971e929f4 (diff)
downloadqemu-1d984a67a95d88f3e708b077dab8adeb47c38c93.zip
qemu-1d984a67a95d88f3e708b077dab8adeb47c38c93.tar.gz
qemu-1d984a67a95d88f3e708b077dab8adeb47c38c93.tar.bz2
configure: Don't write .pyc files by default (python -B)
When a Python script is run, Python normally writes bytecode into a .pyc file. QEMU's build process uses several Python scripts which are called from configure or make. The generated .pyc files take disk space without being of much use, because those scripts are short, not time critical and only called a few times. Python's option -B disables writing of .pyc files. QEMU now uses "python -B" as default, but it is still possible to choose a different call by passing --python=PYTHON to configure. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure b/configure
index 03157c7..391b204 100755
--- a/configure
+++ b/configure
@@ -568,7 +568,7 @@ fi
: ${make=${MAKE-make}}
: ${install=${INSTALL-install}}
-: ${python=${PYTHON-python}}
+: ${python=${PYTHON-python -B}}
: ${smbd=${SMBD-/usr/sbin/smbd}}
# Default objcc to clang if available, otherwise use CC
@@ -1349,7 +1349,7 @@ fi
# Note that if the Python conditional here evaluates True we will exit
# with status 1 which is a shell 'false' value.
-if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_info >= (3,))'; then
+if ! $python -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_info >= (3,))'; then
error_exit "Cannot use '$python', Python 2.4 or later is required." \
"Note that Python 3 or later is not yet supported." \
"Use --python=/path/to/python to specify a supported Python."