diff options
author | David Garcia Quintas <dgq@google.com> | 2016-01-14 14:02:32 -0800 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-01-14 14:02:32 -0800 |
commit | 48794a4e831d2b1572d8048229e36b7e42b24a3b (patch) | |
tree | 8c8b46ef71fc005fcc9009b5b8ed31d41c6365f1 /tools/distrib | |
parent | 9b454a3428897e9af8319e6824d43ddbdb6bea83 (diff) | |
parent | 88447cbbad44aaf009c27480581672b3047e43a1 (diff) |
Merge branch 'grpclb_api' of github.com:dgquintas/grpc into grpclb_api
Diffstat (limited to 'tools/distrib')
-rwxr-xr-x | tools/distrib/python/submit.py | 17 |
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] |