Merge pull request #5283 from soltanmm/abi-fu

Add more information to precompiled name.
pull/5446/head
Nathaniel Manista 9 years ago
commit 22648b7f7c
  1. 13
      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):

Loading…
Cancel
Save