aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2016-01-14 11:51:11 -0800
committerGravatar yang-g <yangg@google.com>2016-01-14 11:51:11 -0800
commit25f191d49bd12addce28e11386c242dfde74b4fe (patch)
treee4fc3e2b964530dd33a6e5ef6b969736c287c99f /tools
parentb9a1377fab3a25fd60e8b632dcf688d470ee9127 (diff)
parenta2517a15734715c65be37a382c352ba17e89d816 (diff)
merge with head
Diffstat (limited to 'tools')
-rwxr-xr-xtools/distrib/python/submit.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/distrib/python/submit.py b/tools/distrib/python/submit.py
index 08ace7c690..9b012be672 100755
--- a/tools/distrib/python/submit.py
+++ b/tools/distrib/python/submit.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python2.7
-# Copyright 2015, Google Inc.
+# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -55,6 +55,14 @@ parser.add_argument(
help='Password to authenticate with the repository. Not needed if you have '
'configured your .pypirc to include your password.'
)
+parser.add_argument(
+ '--bdist', '-b', action='store_true',
+ help='Generate a binary distribution (wheel) for the current OS.'
+)
+parser.add_argument(
+ '--dist-args', type=str,
+ help='Additional arguments to pass to the *dist setup.py command.'
+)
args = parser.parse_args()
# Move to the root directory of Python GRPC.
@@ -73,7 +81,12 @@ cmd = ['python', 'setup.py', 'build_ext', '--inplace']
subprocess.call(cmd, cwd=pkgdir, env=build_env)
# Make the push.
-cmd = ['python', 'setup.py', 'sdist']
+if args.bdist:
+ cmd = ['python', 'setup.py', 'bdist_wheel']
+else:
+ cmd = ['python', 'setup.py', 'sdist']
+if args.dist_args:
+ cmd += args.dist_args.split()
subprocess.call(cmd, cwd=pkgdir)
cmd = ['twine', 'upload', '-r', args.repository]