Skip to content

Commit

Permalink
Integrate zlib into Python distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
soltanmm-google committed Jan 23, 2016
1 parent b9f11dd commit 0cc2792
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions PYTHON-MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ graft src/python/grpcio/tests
graft src/core
graft include/grpc
graft third_party/boringssl
graft third_party/zlib
include src/python/grpcio/commands.py
include src/python/grpcio/grpc_core_dependencies.py
include src/python/grpcio/README.rst
Expand Down
1 change: 1 addition & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2636,3 +2636,4 @@ python_dependencies:
- grpc
- gpr
- boringssl
- z
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
PYTHON_STEM = './src/python/grpcio'
CORE_INCLUDE = ('./include', '.',)
BORINGSSL_INCLUDE = ('./third_party/boringssl/include',)
ZLIB_INCLUDE = ('./third_party/zlib',)

# Ensure we're in the proper directory whether or not we're being used by pip.
os.chdir(os.path.dirname(os.path.abspath(__file__)))
Expand Down Expand Up @@ -75,9 +76,9 @@
CYTHON_EXTENSION_MODULE_NAMES = ('grpc._cython.cygrpc',)

EXTENSION_INCLUDE_DIRECTORIES = (
(PYTHON_STEM,) + CORE_INCLUDE + BORINGSSL_INCLUDE)
(PYTHON_STEM,) + CORE_INCLUDE + BORINGSSL_INCLUDE + ZLIB_INCLUDE)

EXTENSION_LIBRARIES = ('z', 'm',)
EXTENSION_LIBRARIES = ('m',)
if not "darwin" in sys.platform:
EXTENSION_LIBRARIES += ('rt',)

Expand Down
15 changes: 15 additions & 0 deletions src/python/grpcio/grpc_core_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,4 +517,19 @@
'third_party/boringssl/ssl/t1_enc.c',
'third_party/boringssl/ssl/t1_lib.c',
'third_party/boringssl/ssl/tls_record.c',
'third_party/zlib/adler32.c',
'third_party/zlib/compress.c',
'third_party/zlib/crc32.c',
'third_party/zlib/deflate.c',
'third_party/zlib/gzclose.c',
'third_party/zlib/gzlib.c',
'third_party/zlib/gzread.c',
'third_party/zlib/gzwrite.c',
'third_party/zlib/infback.c',
'third_party/zlib/inffast.c',
'third_party/zlib/inflate.c',
'third_party/zlib/inftrees.c',
'third_party/zlib/trees.c',
'third_party/zlib/uncompr.c',
'third_party/zlib/zutil.c',
]

0 comments on commit 0cc2792

Please sign in to comment.