diff options
Diffstat (limited to 'tools')
-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] |