Index: work/setup.py =================================================================== --- work.orig/setup.py +++ work/setup.py @@ -107,6 +107,7 @@ CLASSIFIERS = [ BUILD_WITH_BORING_SSL_ASM = os.environ.get('GRPC_BUILD_WITH_BORING_SSL_ASM', True) +BUILD_PREFIX = os.environ.get('GRPC_BUILD_PREFIX', '') # Environment variable to determine whether or not the Cython extension should # *use* Cython or use the generated C files. Note that this requires the C files @@ -273,19 +274,19 @@ if BUILD_WITH_SYSTEM_OPENSSL: CORE_C_FILES = filter(lambda x: 'third_party/boringssl' not in x, CORE_C_FILES) CORE_C_FILES = filter(lambda x: 'src/boringssl' not in x, CORE_C_FILES) - SSL_INCLUDE = (os.path.join('/usr', 'include', 'openssl'),) + SSL_INCLUDE = (os.path.join(BUILD_PREFIX + '/usr', 'include', 'openssl'),) if BUILD_WITH_SYSTEM_ZLIB: CORE_C_FILES = filter(lambda x: 'third_party/zlib' not in x, CORE_C_FILES) - ZLIB_INCLUDE = (os.path.join('/usr', 'include'),) + ZLIB_INCLUDE = (os.path.join(BUILD_PREFIX + '/usr', 'include'),) if BUILD_WITH_SYSTEM_CARES: CORE_C_FILES = filter(lambda x: 'third_party/cares' not in x, CORE_C_FILES) - CARES_INCLUDE = (os.path.join('/usr', 'include'),) + CARES_INCLUDE = (os.path.join(BUILD_PREFIX + '/usr', 'include'),) if BUILD_WITH_SYSTEM_RE2: CORE_C_FILES = filter(lambda x: 'third_party/re2' not in x, CORE_C_FILES) - RE2_INCLUDE = (os.path.join('/usr', 'include', 're2'),) + RE2_INCLUDE = (os.path.join(BUILD_PREFIX + '/usr', 'include', 're2'),) EXTENSION_INCLUDE_DIRECTORIES = ((PYTHON_STEM,) + CORE_INCLUDE + ABSL_INCLUDE + ADDRESS_SORTING_INCLUDE + CARES_INCLUDE +