blob: e42c8342ea69d4a7bbed6bac4a42083f8ede3398 [file] [log] [blame]
Jan Tattermusch7897ae92017-06-07 22:57:36 +02001# Copyright 2015 gRPC authors.
Nathaniel Manistab68f3d12015-01-23 21:32:47 +00002#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02003# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
Nathaniel Manistab68f3d12015-01-23 21:32:47 +00006#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02007# http://www.apache.org/licenses/LICENSE-2.0
Nathaniel Manistab68f3d12015-01-23 21:32:47 +00008#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02009# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
Nathaniel Manistab68f3d12015-01-23 21:32:47 +000014
Nathaniel Manistab8b0adf2015-01-29 00:30:51 +000015"""A setup module for the GRPC Python package."""
Ken Payson5998cd72016-08-10 15:39:43 -070016from distutils import cygwinccompiler
Masood Malekghassemiabdff3d2016-07-18 13:26:25 -070017from distutils import extension as _extension
Masood Malekghassemi398b06e2016-07-15 23:17:41 -070018from distutils import util
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070019import os
Masood Malekghassemid65632a2015-07-27 14:30:09 -070020import os.path
Masood Malekghassemiabdff3d2016-07-18 13:26:25 -070021import pkg_resources
Masood Malekghassemi586e3832016-06-03 19:29:12 -070022import platform
Masood Malekghassemi398b06e2016-07-15 23:17:41 -070023import re
Ken Paysonfe754b42016-06-23 12:32:07 -070024import shlex
Masood Malekghassemi6d2ef172016-01-04 15:33:17 -080025import shutil
Alexander Staubo8eac91e2015-04-06 12:06:22 -040026import sys
Ken Payson1efb6012016-06-08 13:06:44 -070027import sysconfig
Nathaniel Manistab68f3d12015-01-23 21:32:47 +000028
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070029import setuptools
Masood Malekghassemib7e7b3f2015-12-17 00:16:49 -080030from setuptools.command import egg_info
31
32# Redirect the manifest template from MANIFEST.in to PYTHON-MANIFEST.in.
33egg_info.manifest_maker.template = 'PYTHON-MANIFEST.in'
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070034
Leifur Halldor Asgeirsson38a3d7a2016-03-01 10:00:08 -050035PY3 = sys.version_info.major == 3
Masood Malekghassemi58a04942016-07-16 01:42:52 -070036PYTHON_STEM = os.path.join('src', 'python', 'grpcio')
37CORE_INCLUDE = ('include', '.',)
38BORINGSSL_INCLUDE = (os.path.join('third_party', 'boringssl', 'include'),)
39ZLIB_INCLUDE = (os.path.join('third_party', 'zlib'),)
Yuchen Zengf64bf282016-08-11 21:21:32 -070040CARES_INCLUDE = (
Yuchen Zeng6694bb02017-01-23 17:09:51 -080041 os.path.join('third_party', 'cares'),
42 os.path.join('third_party', 'cares', 'cares'),)
Yuchen Zengf64bf282016-08-11 21:21:32 -070043if 'linux' in sys.platform:
Yuchen Zeng6694bb02017-01-23 17:09:51 -080044 CARES_INCLUDE += (os.path.join('third_party', 'cares', 'config_linux'),)
Yuchen Zengf64bf282016-08-11 21:21:32 -070045if 'darwin' in sys.platform:
Yuchen Zeng6694bb02017-01-23 17:09:51 -080046 CARES_INCLUDE += (os.path.join('third_party', 'cares', 'config_darwin'),)
Masood Malekghassemib928de82016-10-28 15:05:33 -070047README = os.path.join(PYTHON_STEM, 'README.rst')
Masood Malekghassemi116982e2015-12-11 15:53:38 -080048
Masood Malekghassemid65632a2015-07-27 14:30:09 -070049# Ensure we're in the proper directory whether or not we're being used by pip.
50os.chdir(os.path.dirname(os.path.abspath(__file__)))
Masood Malekghassemi58a1dc22016-01-21 14:23:55 -080051sys.path.insert(0, os.path.abspath(PYTHON_STEM))
Masood Malekghassemid65632a2015-07-27 14:30:09 -070052
Masood Malekghassemi116982e2015-12-11 15:53:38 -080053# Break import-style to ensure we can actually find our in-repo dependencies.
Ken Payson5998cd72016-08-10 15:39:43 -070054import _spawn_patch
Masood Malekghassemid65632a2015-07-27 14:30:09 -070055import commands
Masood Malekghassemi116982e2015-12-11 15:53:38 -080056import grpc_core_dependencies
Craig Tillerf008f062016-02-08 12:48:03 -080057import grpc_version
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070058
Ken Payson5998cd72016-08-10 15:39:43 -070059_spawn_patch.monkeypatch_spawn()
Masood Malekghassemi586e3832016-06-03 19:29:12 -070060
Jan Tattermusch4d5c3102017-06-07 10:23:56 +020061LICENSE = 'Apache License 2.0'
Masood Malekghassemidf97aec2016-01-11 16:19:14 -080062
Masood Malekghassemi7566c9a2015-10-21 20:29:23 -070063# Environment variable to determine whether or not the Cython extension should
64# *use* Cython or use the generated C files. Note that this requires the C files
Masood Malekghassemif17f0f62016-07-08 12:07:49 -070065# to have been generated by building first *with* Cython support. Even if this
66# is set to false, if the script detects that the generated `.c` file isn't
67# present, then it will still attempt to use Cython.
Masood Malekghassemi7566c9a2015-10-21 20:29:23 -070068BUILD_WITH_CYTHON = os.environ.get('GRPC_PYTHON_BUILD_WITH_CYTHON', False)
Masood Malekghassemi743c10c2015-06-16 18:05:27 -070069
Masood Malekghassemi7566c9a2015-10-21 20:29:23 -070070# Environment variable to determine whether or not to enable coverage analysis
71# in Cython modules.
72ENABLE_CYTHON_TRACING = os.environ.get(
73 'GRPC_PYTHON_ENABLE_CYTHON_TRACING', False)
74
Masood Malekghassemi2da46662016-10-25 15:57:48 -070075# Environment variable specifying whether or not there's interest in setting up
76# documentation building.
77ENABLE_DOCUMENTATION_BUILD = os.environ.get(
78 'GRPC_PYTHON_ENABLE_DOCUMENTATION_BUILD', False)
79
Masood Malekghassemi586e3832016-06-03 19:29:12 -070080# There are some situations (like on Windows) where CC, CFLAGS, and LDFLAGS are
81# entirely ignored/dropped/forgotten by distutils and its Cygwin/MinGW support.
82# We use these environment variables to thus get around that without locking
83# ourselves in w.r.t. the multitude of operating systems this ought to build on.
Masood Malekghassemid66be0b2016-07-07 11:24:39 -070084# We can also use these variables as a way to inject environment-specific
85# compiler/linker flags. We assume GCC-like compilers and/or MinGW as a
86# reasonable default.
87EXTRA_ENV_COMPILE_ARGS = os.environ.get('GRPC_PYTHON_CFLAGS', None)
88EXTRA_ENV_LINK_ARGS = os.environ.get('GRPC_PYTHON_LDFLAGS', None)
89if EXTRA_ENV_COMPILE_ARGS is None:
Ken Payson571c75a2017-04-13 16:39:37 -070090 EXTRA_ENV_COMPILE_ARGS = ''
Ken Payson5998cd72016-08-10 15:39:43 -070091 if 'win32' in sys.platform and sys.version_info < (3, 5):
Ken Payson63b0d112017-04-17 00:03:40 -070092 EXTRA_ENV_COMPILE_ARGS += ' -std=c++11'
Masood Malekghassemid66be0b2016-07-07 11:24:39 -070093 # We use define flags here and don't directly add to DEFINE_MACROS below to
94 # ensure that the expert user/builder has a way of turning it off (via the
95 # envvars) without adding yet more GRPC-specific envvars.
96 # See https://sourceforge.net/p/mingw-w64/bugs/363/
97 if '32' in platform.architecture()[0]:
98 EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime32 -D_timeb=__timeb32 -D_ftime_s=_ftime32_s'
99 else:
100 EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime64 -D_timeb=__timeb64'
Ken Payson45a520f2017-01-24 09:40:21 -0800101 elif 'win32' in sys.platform:
Ken Payson63b0d112017-04-17 00:03:40 -0700102 EXTRA_ENV_COMPILE_ARGS += ' -D_PYTHON_MSVC'
Ken Payson571c75a2017-04-13 16:39:37 -0700103 elif "linux" in sys.platform:
Ken Paysonf8d6fb72017-06-15 17:32:49 -0700104 EXTRA_ENV_COMPILE_ARGS += ' -std=c++11 -std=gnu99 -fvisibility=hidden -fno-wrapv -fno-exceptions'
Ken Payson571c75a2017-04-13 16:39:37 -0700105 elif "darwin" in sys.platform:
Ken Paysonf8d6fb72017-06-15 17:32:49 -0700106 EXTRA_ENV_COMPILE_ARGS += ' -fvisibility=hidden -fno-wrapv -fno-exceptions'
Ken Payson45a520f2017-01-24 09:40:21 -0800107
Masood Malekghassemid66be0b2016-07-07 11:24:39 -0700108if EXTRA_ENV_LINK_ARGS is None:
Ken Payson5998cd72016-08-10 15:39:43 -0700109 EXTRA_ENV_LINK_ARGS = ''
110 if "linux" in sys.platform or "darwin" in sys.platform:
111 EXTRA_ENV_LINK_ARGS += ' -lpthread'
112 elif "win32" in sys.platform and sys.version_info < (3, 5):
113 msvcr = cygwinccompiler.get_msvcr()[0]
Masood Malekghassemid66be0b2016-07-07 11:24:39 -0700114 # TODO(atash) sift through the GCC specs to see if libstdc++ can have any
115 # influence on the linkage outcome on MinGW for non-C++ programs.
116 EXTRA_ENV_LINK_ARGS += (
117 ' -static-libgcc -static-libstdc++ -mcrtdll={msvcr} '
118 '-static'.format(msvcr=msvcr))
Nicolas "Pixel" Noblee3e17d32016-08-20 01:45:32 +0200119 if "linux" in sys.platform:
Ken Paysonf8d6fb72017-06-15 17:32:49 -0700120 EXTRA_ENV_LINK_ARGS += ' -Wl,-wrap,memcpy -static-libgcc'
Ken Payson5998cd72016-08-10 15:39:43 -0700121
Masood Malekghassemid66be0b2016-07-07 11:24:39 -0700122EXTRA_COMPILE_ARGS = shlex.split(EXTRA_ENV_COMPILE_ARGS)
123EXTRA_LINK_ARGS = shlex.split(EXTRA_ENV_LINK_ARGS)
Masood Malekghassemi586e3832016-06-03 19:29:12 -0700124
Masood Malekghassemi7566c9a2015-10-21 20:29:23 -0700125CYTHON_EXTENSION_PACKAGE_NAMES = ()
Masood Malekghassemi5a65bcd2015-09-25 11:27:10 -0700126
Masood Malekghassemi116982e2015-12-11 15:53:38 -0800127CYTHON_EXTENSION_MODULE_NAMES = ('grpc._cython.cygrpc',)
Masood Malekghassemi5a65bcd2015-09-25 11:27:10 -0700128
Masood Malekghassemi3acddb22016-07-13 18:38:33 -0700129CYTHON_HELPER_C_FILES = ()
Masood Malekghassemidf1e07e2016-02-02 14:17:14 -0800130
Masood Malekghassemi586e3832016-06-03 19:29:12 -0700131CORE_C_FILES = tuple(grpc_core_dependencies.CORE_SOURCE_FILES)
Yuchen Zengb4d33e02017-04-20 16:41:25 -0700132if "win32" in sys.platform and "64bit" in platform.architecture()[0]:
133 CORE_C_FILES = filter(lambda x: 'third_party/cares' not in x, CORE_C_FILES)
Masood Malekghassemidf1e07e2016-02-02 14:17:14 -0800134
Masood Malekghassemi387e1162016-01-05 10:16:12 -0800135EXTENSION_INCLUDE_DIRECTORIES = (
Yuchen Zengf64bf282016-08-11 21:21:32 -0700136 (PYTHON_STEM,) + CORE_INCLUDE + BORINGSSL_INCLUDE + ZLIB_INCLUDE +
137 CARES_INCLUDE)
Nathaniel Manistaa4ead5d2015-01-31 01:33:27 +0000138
Masood Malekghassemi10509a22016-02-03 13:32:22 -0800139EXTENSION_LIBRARIES = ()
Masood Malekghassemic9c53ee2016-02-03 10:30:23 -0800140if "linux" in sys.platform:
Craig Tiller4bef7ce2016-02-02 08:38:43 -0800141 EXTENSION_LIBRARIES += ('rt',)
Masood Malekghassemi10509a22016-02-03 13:32:22 -0800142if not "win32" in sys.platform:
143 EXTENSION_LIBRARIES += ('m',)
Masood Malekghassemi586e3832016-06-03 19:29:12 -0700144if "win32" in sys.platform:
Ken Payson5998cd72016-08-10 15:39:43 -0700145 EXTENSION_LIBRARIES += ('advapi32', 'ws2_32',)
Nathaniel Manistaa4ead5d2015-01-31 01:33:27 +0000146
Masood Malekghassemi58a04942016-07-16 01:42:52 -0700147DEFINE_MACROS = (
148 ('OPENSSL_NO_ASM', 1), ('_WIN32_WINNT', 0x600),
149 ('GPR_BACKWARDS_COMPATIBILITY_MODE', 1),)
Masood Malekghassemi586e3832016-06-03 19:29:12 -0700150if "win32" in sys.platform:
Yuchen Zeng48e544d2017-01-23 21:25:34 -0800151 DEFINE_MACROS += (('WIN32_LEAN_AND_MEAN', 1), ('CARES_STATICLIB', 1),)
Masood Malekghassemi586e3832016-06-03 19:29:12 -0700152 if '64bit' in platform.architecture()[0]:
Yuchen Zengb4d33e02017-04-20 16:41:25 -0700153 # TODO(zyc): Re-enble c-ares on x64 windows after fixing the
154 # ares_library_init compilation issue
155 DEFINE_MACROS += (('MS_WIN64', 1), ('GRPC_ARES', 0),)
Ken Payson5998cd72016-08-10 15:39:43 -0700156 elif sys.version_info >= (3, 5):
157 # For some reason, this is needed to get access to inet_pton/inet_ntop
158 # on msvc, but only for 32 bits
159 DEFINE_MACROS += (('NTDDI_VERSION', 0x06000000),)
Yuchen Zeng88d4e772016-08-16 22:34:02 -0700160else:
161 DEFINE_MACROS += (('HAVE_CONFIG_H', 1),)
Masood Malekghassemi743c10c2015-06-16 18:05:27 -0700162
Masood Malekghassemi586e3832016-06-03 19:29:12 -0700163LDFLAGS = tuple(EXTRA_LINK_ARGS)
164CFLAGS = tuple(EXTRA_COMPILE_ARGS)
Craig Tiller4bef7ce2016-02-02 08:38:43 -0800165if "linux" in sys.platform or "darwin" in sys.platform:
Leifur Halldor Asgeirsson38a3d7a2016-03-01 10:00:08 -0500166 pymodinit_type = 'PyObject*' if PY3 else 'void'
Ken Payson571c75a2017-04-13 16:39:37 -0700167 pymodinit = '__attribute__((visibility ("default"))) {}'.format(pymodinit_type)
Leifur Halldor Asgeirsson38a3d7a2016-03-01 10:00:08 -0500168 DEFINE_MACROS += (('PyMODINIT_FUNC', pymodinit),)
Craig Tiller4bef7ce2016-02-02 08:38:43 -0800169
Ken Payson1efb6012016-06-08 13:06:44 -0700170# By default, Python3 distutils enforces compatibility of
171# c plugins (.so files) with the OSX version Python3 was built with.
172# For Python3.4, this is OSX 10.6, but we need Thread Local Support (__thread)
173if 'darwin' in sys.platform and PY3:
174 mac_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
175 if mac_target and (pkg_resources.parse_version(mac_target) <
176 pkg_resources.parse_version('10.7.0')):
177 os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.7'
Masood Malekghassemi398b06e2016-07-15 23:17:41 -0700178 os.environ['_PYTHON_HOST_PLATFORM'] = re.sub(
179 r'macosx-[0-9]+\.[0-9]+-(.+)',
180 r'macosx-10.7-\1',
181 util.get_platform())
Ken Payson1efb6012016-06-08 13:06:44 -0700182
Masood Malekghassemifd9cc102016-07-21 14:20:43 -0700183def cython_extensions_and_necessity():
184 cython_module_files = [os.path.join(PYTHON_STEM,
185 name.replace('.', '/') + '.pyx')
186 for name in CYTHON_EXTENSION_MODULE_NAMES]
Ken Paysonae5ca1b2017-04-14 16:34:26 -0700187 config = os.environ.get('CONFIG', 'opt')
Ken Payson5b034e62017-04-14 16:25:51 -0700188 prefix = 'libs/' + config + '/'
Ken Payson571c75a2017-04-13 16:39:37 -0700189 if "darwin" in sys.platform:
Ken Payson5b034e62017-04-14 16:25:51 -0700190 extra_objects = [prefix + 'libares.a',
191 prefix + 'libboringssl.a',
192 prefix + 'libgpr.a',
193 prefix + 'libgrpc.a']
Ken Payson2d9c9d92017-04-13 17:07:32 -0700194 core_c_files = []
Ken Payson571c75a2017-04-13 16:39:37 -0700195 else:
Ken Payson2d9c9d92017-04-13 17:07:32 -0700196 core_c_files = list(CORE_C_FILES)
Ken Payson571c75a2017-04-13 16:39:37 -0700197 extra_objects = []
Masood Malekghassemi5a65bcd2015-09-25 11:27:10 -0700198 extensions = [
199 _extension.Extension(
Masood Malekghassemi116982e2015-12-11 15:53:38 -0800200 name=module_name,
Ken Payson2d9c9d92017-04-13 17:07:32 -0700201 sources=[module_file] + list(CYTHON_HELPER_C_FILES) + core_c_files,
Masood Malekghassemifd9cc102016-07-21 14:20:43 -0700202 include_dirs=list(EXTENSION_INCLUDE_DIRECTORIES),
203 libraries=list(EXTENSION_LIBRARIES),
204 define_macros=list(DEFINE_MACROS),
Ken Payson571c75a2017-04-13 16:39:37 -0700205 extra_objects=extra_objects,
Craig Tillera7f3e052016-02-05 15:02:39 -0800206 extra_compile_args=list(CFLAGS),
207 extra_link_args=list(LDFLAGS),
Masood Malekghassemifd9cc102016-07-21 14:20:43 -0700208 ) for (module_name, module_file) in zip(list(CYTHON_EXTENSION_MODULE_NAMES), cython_module_files)
Masood Malekghassemi5a65bcd2015-09-25 11:27:10 -0700209 ]
Masood Malekghassemifd9cc102016-07-21 14:20:43 -0700210 need_cython = BUILD_WITH_CYTHON
211 if not BUILD_WITH_CYTHON:
212 need_cython = need_cython or not commands.check_and_update_cythonization(extensions)
213 return commands.try_cythonize(extensions, linetracing=ENABLE_CYTHON_TRACING, mandatory=BUILD_WITH_CYTHON), need_cython
Masood Malekghassemi5a65bcd2015-09-25 11:27:10 -0700214
Masood Malekghassemifd9cc102016-07-21 14:20:43 -0700215CYTHON_EXTENSION_MODULES, need_cython = cython_extensions_and_necessity()
Masood Malekghassemi5a65bcd2015-09-25 11:27:10 -0700216
Masood Malekghassemi7566c9a2015-10-21 20:29:23 -0700217PACKAGE_DIRECTORIES = {
Masood Malekghassemi116982e2015-12-11 15:53:38 -0800218 '': PYTHON_STEM,
Nathaniel Manistab8b0adf2015-01-29 00:30:51 +0000219}
220
Masood Malekghassemi7566c9a2015-10-21 20:29:23 -0700221INSTALL_REQUIRES = (
Ken Payson2b7fae02016-06-28 17:20:37 -0700222 'six>=1.5.2',
Masood Malekghassemiad32ff42016-01-21 15:15:38 -0800223 # TODO(atash): eventually split the grpcio package into a metapackage
224 # depending on protobuf and the runtime component (independent of protobuf)
Ken Payson02909062017-05-04 12:33:58 -0700225 'protobuf>=3.3.0',
Masood Malekghassemid65632a2015-07-27 14:30:09 -0700226)
227
aaronjhengb273c042016-08-29 12:02:48 +0800228if not PY3:
Ken Payson34e91942017-03-20 14:32:33 -0700229 INSTALL_REQUIRES += ('futures>=2.2.0', 'enum34>=1.0.4')
aaronjhengb273c042016-08-29 12:02:48 +0800230
Ken Payson2b7fae02016-06-28 17:20:37 -0700231SETUP_REQUIRES = INSTALL_REQUIRES + (
Masood Malekghassemid65632a2015-07-27 14:30:09 -0700232 'sphinx>=1.3',
Ken Payson2b7fae02016-06-28 17:20:37 -0700233 'sphinx_rtd_theme>=0.1.8',
234 'six>=1.10',
Masood Malekghassemi2da46662016-10-25 15:57:48 -0700235 ) if ENABLE_DOCUMENTATION_BUILD else ()
236
Masood Malekghassemi5e43db82016-12-14 18:23:25 -0800237try:
238 import Cython
239except ImportError:
240 if BUILD_WITH_CYTHON:
241 sys.stderr.write(
242 "You requested a Cython build via GRPC_PYTHON_BUILD_WITH_CYTHON, "
243 "but do not have Cython installed. We won't stop you from using "
244 "other commands, but the extension files will fail to build.\n")
245 elif need_cython:
246 sys.stderr.write(
247 'We could not find Cython. Setup may take 10-20 minutes.\n')
248 SETUP_REQUIRES += ('cython>=0.23',)
Masood Malekghassemid65632a2015-07-27 14:30:09 -0700249
Masood Malekghassemi7566c9a2015-10-21 20:29:23 -0700250COMMAND_CLASS = {
Masood Malekghassemi791cc312015-07-27 14:22:33 -0700251 'doc': commands.SphinxDocumentation,
Masood Malekghassemi5c147632015-07-31 14:08:19 -0700252 'build_project_metadata': commands.BuildProjectMetadata,
253 'build_py': commands.BuildPy,
Masood Malekghassemi1d177812016-01-12 09:21:57 -0800254 'build_ext': commands.BuildExt,
Masood Malekghassemi7566c9a2015-10-21 20:29:23 -0700255 'gather': commands.Gather,
Masood Malekghassemid65632a2015-07-27 14:30:09 -0700256}
257
Masood Malekghassemi6d2ef172016-01-04 15:33:17 -0800258# Ensure that package data is copied over before any commands have been run:
Masood Malekghassemi58a04942016-07-16 01:42:52 -0700259credentials_dir = os.path.join(PYTHON_STEM, 'grpc', '_cython', '_credentials')
Masood Malekghassemi6d2ef172016-01-04 15:33:17 -0800260try:
261 os.mkdir(credentials_dir)
262except OSError:
263 pass
Masood Malekghassemi58a04942016-07-16 01:42:52 -0700264shutil.copyfile(os.path.join('etc', 'roots.pem'),
265 os.path.join(credentials_dir, 'roots.pem'))
Masood Malekghassemi6d2ef172016-01-04 15:33:17 -0800266
Masood Malekghassemidf1e07e2016-02-02 14:17:14 -0800267PACKAGE_DATA = {
Masood Malekghassemif7474092016-02-12 12:04:53 -0800268 # Binaries that may or may not be present in the final installation, but are
269 # mentioned here for completeness.
Masood Malekghassemidf1e07e2016-02-02 14:17:14 -0800270 'grpc._cython': [
Nathaniel Manistafa6cad72016-02-05 21:26:54 +0000271 '_credentials/roots.pem',
Masood Malekghassemidf1e07e2016-02-02 14:17:14 -0800272 '_windows/grpc_c.32.python',
273 '_windows/grpc_c.64.python',
274 ],
275}
Masood Malekghassemi1ff429d2016-06-02 16:39:20 -0700276PACKAGES = setuptools.find_packages(PYTHON_STEM)
Masood Malekghassemi7566c9a2015-10-21 20:29:23 -0700277
Masood Malekghassemiab5309c2016-05-05 18:39:01 -0700278setuptools.setup(
279 name='grpcio',
280 version=grpc_version.VERSION,
Ken Payson78354302017-03-06 09:28:16 -0800281 description='HTTP/2-based RPC framework',
282 author='The gRPC Authors',
283 author_email='grpc-io@googlegroups.com',
Mehrdad Afsharibb3d95b2017-07-10 22:24:28 +0000284 url='https://grpc.io',
Masood Malekghassemiab5309c2016-05-05 18:39:01 -0700285 license=LICENSE,
Masood Malekghassemib928de82016-10-28 15:05:33 -0700286 long_description=open(README).read(),
Masood Malekghassemiab5309c2016-05-05 18:39:01 -0700287 ext_modules=CYTHON_EXTENSION_MODULES,
288 packages=list(PACKAGES),
289 package_dir=PACKAGE_DIRECTORIES,
Masood Malekghassemiab5309c2016-05-05 18:39:01 -0700290 package_data=PACKAGE_DATA,
291 install_requires=INSTALL_REQUIRES,
292 setup_requires=SETUP_REQUIRES,
293 cmdclass=COMMAND_CLASS,
Masood Malekghassemiab5309c2016-05-05 18:39:01 -0700294)