Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: build/linux/python_arch.sh

Issue 660443: Build pyauto only if the architecture of python binary matches.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/common.gypi ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/linux/python_arch.sh
===================================================================
--- build/linux/python_arch.sh (revision 0)
+++ build/linux/python_arch.sh (revision 0)
@@ -0,0 +1,38 @@
+#!/bin/bash
+# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This figures out the architecture of the version of Python we are building
+# pyautolib against.
+#
+# python_arch.sh /usr/bin/python2.5
+# python_arch.sh /path/to/sysroot/usr/bin/python2.4
+#
+
+set -e
+
+python=$(readlink -f "$1")
+file_out=$(file "$python")
+
+set +e
+
+echo $file_out | grep -qs "ARM"
+if [ $? -eq 0 ]; then
+ echo arm
+ exit 0
+fi
+
+echo $file_out | grep -qs "x86-64"
+if [ $? -eq 0 ]; then
+ echo x64
+ exit 0
+fi
+
+echo $file_out | grep -qs "Intel 80386"
+if [ $? -eq 0 ]; then
+ echo ia32
+ exit 0
+fi
+
+exit 1
Property changes on: build/linux/python_arch.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
« no previous file with comments | « build/common.gypi ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698