aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-01-24 10:53:20 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-01-24 10:53:20 -0800
commit0f2e2e4a426f5fd8fd46b08679dcbfccc151ca98 (patch)
tree9fcae63c33ad08834cdf88ef3a206bbe163c4406 /tools
parentf9623b21ffb3ca17b36f3ee8f1100dc1f7eb858f (diff)
parent52f545f1db0f910f8474c10f1dfcd937f01cf1d3 (diff)
Merge github.com:grpc/grpc into rollfwd
Diffstat (limited to 'tools')
-rwxr-xr-xtools/distrib/python/docgen.py25
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile2
-rwxr-xr-xtools/run_tests/helper_scripts/build_python.sh11
3 files changed, 24 insertions, 14 deletions
diff --git a/tools/distrib/python/docgen.py b/tools/distrib/python/docgen.py
index 38ffcd6e0e..fddaa2ba3e 100755
--- a/tools/distrib/python/docgen.py
+++ b/tools/distrib/python/docgen.py
@@ -28,11 +28,14 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+from __future__ import print_function
+
import argparse
import os
import os.path
import shutil
import subprocess
+import sys
import tempfile
parser = argparse.ArgumentParser()
@@ -99,6 +102,7 @@ if args.submit:
python_doc_dir = os.path.join(repo_dir, 'python')
doc_branch = args.doc_branch
+ print('Cloning your repository...')
subprocess.check_call([
'git', 'clone', 'https://{}@github.com/{}/grpc'.format(
github_user, github_repository_owner)
@@ -110,13 +114,20 @@ if args.submit:
subprocess.check_call([
'git', 'checkout', 'upstream/gh-pages', '-b', doc_branch
], cwd=repo_dir)
+ print('Updating documentation...')
shutil.rmtree(python_doc_dir, ignore_errors=True)
shutil.copytree(DOC_PATH, python_doc_dir)
- subprocess.check_call(['git', 'add', '--all'], cwd=repo_dir)
- subprocess.check_call([
- 'git', 'commit', '-m', 'Auto-update Python documentation'
- ], cwd=repo_dir)
- subprocess.check_call([
- 'git', 'push', '--set-upstream', 'origin', doc_branch
- ], cwd=repo_dir)
+ print('Attempting to push documentation...')
+ try:
+ subprocess.check_call(['git', 'add', '--all'], cwd=repo_dir)
+ subprocess.check_call([
+ 'git', 'commit', '-m', 'Auto-update Python documentation'
+ ], cwd=repo_dir)
+ subprocess.check_call([
+ 'git', 'push', '--set-upstream', 'origin', doc_branch
+ ], cwd=repo_dir)
+ except subprocess.CalledProcessError:
+ print('Failed to push documentation. Examine this directory and push '
+ 'manually: {}'.format(repo_parent_dir))
+ sys.exit(1)
shutil.rmtree(repo_parent_dir)
diff --git a/tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile
index 05e963d1e6..3a5e15d21b 100644
--- a/tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile
@@ -47,5 +47,7 @@ RUN pip install pip --upgrade
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 six==1.10.0
+RUN pip install twisted h2
+
# Define the default command.
CMD ["bash"]
diff --git a/tools/run_tests/helper_scripts/build_python.sh b/tools/run_tests/helper_scripts/build_python.sh
index 0e88e96765..5647d9c2fc 100755
--- a/tools/run_tests/helper_scripts/build_python.sh
+++ b/tools/run_tests/helper_scripts/build_python.sh
@@ -163,22 +163,18 @@ pip_install_dir() {
PWD=`pwd`
cd $1
($VENV_PYTHON setup.py build_ext -c $TOOLCHAIN || true)
- # install the dependencies
- $VENV_PYTHON -m pip install --upgrade .
- # ensure that we've reinstalled the test packages
- $VENV_PYTHON -m pip install --upgrade --force-reinstall --no-deps .
+ $VENV_PYTHON -m pip install --no-deps .
cd $PWD
}
$VENV_PYTHON -m pip install --upgrade pip
$VENV_PYTHON -m pip install setuptools
$VENV_PYTHON -m pip install cython
+$VENV_PYTHON -m pip install six enum34 protobuf futures
pip_install_dir $ROOT
+
$VENV_PYTHON $ROOT/tools/distrib/python/make_grpcio_tools.py
pip_install_dir $ROOT/tools/distrib/python/grpcio_tools
-# TODO(atash) figure out namespace packages and grpcio-tools and auditwheel
-# etc...
-pip_install_dir $ROOT
# Build/install health checking
$VENV_PYTHON $ROOT/src/python/grpcio_health_checking/setup.py preprocess
@@ -191,6 +187,7 @@ $VENV_PYTHON $ROOT/src/python/grpcio_reflection/setup.py build_package_protos
pip_install_dir $ROOT/src/python/grpcio_reflection
# Build/install tests
+$VENV_PYTHON -m pip install coverage oauth2client
$VENV_PYTHON $ROOT/src/python/grpcio_tests/setup.py preprocess
$VENV_PYTHON $ROOT/src/python/grpcio_tests/setup.py build_package_protos
pip_install_dir $ROOT/src/python/grpcio_tests