Mesa (master): scons: Use the current python executable for code generation .
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Thu Jul 29 18:19:40 UTC 2010
Module: Mesa
Branch: master
Commit: bdaa8be5b7dce396dd98f05e7ad66d48633cc4cb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bdaa8be5b7dce396dd98f05e7ad66d48633cc4cb
Author: José Fonseca <jfonseca at vmware.com>
Date: Tue Jul 20 13:40:01 2010 +0100
scons: Use the current python executable for code generation.
Less susceptible to be broken.
---
src/gallium/auxiliary/SConscript | 4 ++--
src/gallium/drivers/llvmpipe/SConscript | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/gallium/auxiliary/SConscript b/src/gallium/auxiliary/SConscript
index 72a1661..8381ae5 100644
--- a/src/gallium/auxiliary/SConscript
+++ b/src/gallium/auxiliary/SConscript
@@ -34,14 +34,14 @@ env.CodeGenerate(
target = 'util/u_format_table.c',
script = '#src/gallium/auxiliary/util/u_format_table.py',
source = ['#src/gallium/auxiliary/util/u_format.csv'],
- command = 'python $SCRIPT $SOURCE > $TARGET'
+ command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
)
env.CodeGenerate(
target = 'util/u_half.c',
script = 'util/u_half.py',
source = [],
- command = 'python $SCRIPT > $TARGET'
+ command = python_cmd + ' $SCRIPT > $TARGET'
)
env.Depends('util/u_format_table.c', [
diff --git a/src/gallium/drivers/llvmpipe/SConscript b/src/gallium/drivers/llvmpipe/SConscript
index fd6ba15..5583fca 100644
--- a/src/gallium/drivers/llvmpipe/SConscript
+++ b/src/gallium/drivers/llvmpipe/SConscript
@@ -1,3 +1,4 @@
+from sys import executable as python_cmd
import distutils.version
Import('*')
@@ -16,7 +17,7 @@ env.CodeGenerate(
target = 'lp_tile_soa.c',
script = 'lp_tile_soa.py',
source = ['#src/gallium/auxiliary/util/u_format.csv'],
- command = 'python $SCRIPT $SOURCE > $TARGET'
+ command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
)
# XXX: Our dependency scanner only finds depended modules in relative dirs.
More information about the mesa-commit
mailing list