diff options
author | Masood Malekghassemi <atash@google.com> | 2016-03-02 13:56:49 -0800 |
---|---|---|
committer | Masood Malekghassemi <atash@google.com> | 2016-03-02 13:56:49 -0800 |
commit | 357871fd34bcbd043687867392c52bc04f1ab411 (patch) | |
tree | 4f3f4837c416aecd4dc52ff64cdd9d0c50240411 /src/python/grpcio | |
parent | 16e8bbbff2ebf9c80c68431beaed676d1981a64d (diff) | |
parent | 7c9f1c1b1750ff8605b6ca50a61a7d81e1bc5dc5 (diff) |
Merge remote-tracking branch 'upstream/release-0_13'
Diffstat (limited to 'src/python/grpcio')
-rw-r--r-- | src/python/grpcio/README.rst | 12 | ||||
-rw-r--r-- | src/python/grpcio/commands.py | 3 | ||||
-rw-r--r-- | src/python/grpcio/precompiled.py | 13 |
3 files changed, 19 insertions, 9 deletions
diff --git a/src/python/grpcio/README.rst b/src/python/grpcio/README.rst index 698c760ebe..d491311886 100644 --- a/src/python/grpcio/README.rst +++ b/src/python/grpcio/README.rst @@ -6,7 +6,7 @@ Package for gRPC Python. Installation ------------ -gRPC Python is available for Linux and Mac OS X running Python 2.7. +gRPC Python is available for Linux, Mac OS X, and Windows running Python 2.7. From PyPI ~~~~~~~~~ @@ -23,11 +23,15 @@ Else system wide (on Ubuntu)... $ sudo pip install grpcio +n.b. On Windows and on Mac OS X one *must* have a recent release of :code:`pip` +to retrieve the proper wheel from PyPI. Be sure to upgrade to the latest +version! + From Source ~~~~~~~~~~~ Building from source requires that you have the Python headers (usually a -package named `python-dev`). +package named :code:`python-dev`). :: @@ -36,5 +40,5 @@ package named `python-dev`). $ cd $REPO_ROOT $ pip install . -Note that `$REPO_ROOT` can be assigned to whatever directory name floats your -fancy. +Note that :code:`$REPO_ROOT` can be assigned to whatever directory name floats +your fancy. diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index aa29c728f2..99ba41b614 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -119,8 +119,7 @@ class SphinxDocumentation(setuptools.Command): import sphinx import sphinx.apidoc metadata = self.distribution.metadata - src_dir = os.path.join( - PYTHON_STEM, self.distribution.package_dir[''], 'grpc') + src_dir = os.path.join(PYTHON_STEM, 'grpc') sys.path.append(src_dir) sphinx.apidoc.main([ '', '--force', '--full', '-H', metadata.name, '-A', metadata.author, diff --git a/src/python/grpcio/precompiled.py b/src/python/grpcio/precompiled.py index ae2a0c835a..d34250b02c 100644 --- a/src/python/grpcio/precompiled.py +++ b/src/python/grpcio/precompiled.py @@ -31,6 +31,7 @@ import os import platform import shutil import sys +import sysconfig import setuptools @@ -51,9 +52,15 @@ USE_PRECOMPILED_BINARIES = bool(int(os.environ.get( def _tagged_ext_name(base): uname = platform.uname() - tags = '-'.join((grpc_version.VERSION, uname[0], uname[4])) - flavor = 'ucs2' if sys.maxunicode == 65535 else 'ucs4' - return '{base}-{tags}-{flavor}'.format(base=base, tags=tags, flavor=flavor) + tags = ( + grpc_version.VERSION, + 'py{}'.format(sysconfig.get_python_version()), + uname[0], + uname[4], + ) + ucs = 'ucs{}'.format(sysconfig.get_config_var('Py_UNICODE_SIZE')) + return '{base}-{tags}-{ucs}'.format( + base=base, tags='-'.join(tags), ucs=ucs) class BuildTaggedExt(setuptools.Command): |