OLD | NEW |
(Empty) | |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import os |
| 6 import subprocess |
| 7 import sys |
| 8 |
| 9 |
| 10 def Build(source_path, wheelhouse_path): |
| 11 # First, have to compile the protoc executable. Note that this |
| 12 # 1) only runs on unix-like systems, and |
| 13 # 2) requires autoconf and libtool to be installed (e.g. via apt-get). |
| 14 subprocess.check_call(['./autogen.sh'], cwd=source_path) |
| 15 subprocess.check_call(['./configure'], cwd=source_path) |
| 16 subprocess.check_call(['make'], cwd=source_path) |
| 17 |
| 18 # Now that we have <source_path>/src/protoc, we can build the python package. |
| 19 cwd = os.path.join(source_path, 'python') |
| 20 subprocess.check_call( |
| 21 ['python', 'setup.py', 'bdist_wheel', '--dist-dir', wheelhouse_path], |
| 22 cwd=cwd) |
OLD | NEW |