mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-10 05:22:59 +03:00
Fix openr.thrift Python Module Build
Summary: Add Dockerfile build for openr.thrift python module. The python module is built by: 1. Building and installing Facebook libraries with fbcode_builder 2. Building Open/R 3. Generating Cython files from thrift files with the FB thrift compiler 4. Generating C++ files from the Cython modules with the Cython compiler 5. Compiling the C++ modules into shared objects Future work for building and distributing Breeze: - Fix the hacks in build_breeze.sh, see comments therein - Use a staged Dockerfile build for the Open/R and Breeze build - Install openr.thrift. The openr.thrift shared objects are build and stored in the Docker image generated by Dockerfile, but are unused. - Install all the openr python submodules in a single openr site-package - Add cross-compilation to the openr.thrift build. This is needed for Terragraph - Upload the openr python package to PyPi Reviewed By: saifhhasan Differential Revision: D28614443 fbshipit-source-id: 38b7e7c5594fd4bb5a338f19c69e5fc3b3b95863
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e43c29b5dd
commit
999355e3c8
@@ -414,6 +414,14 @@ class FBCodeBuilder(object):
|
||||
'BUILD_SHARED_LIBS': 'ON',
|
||||
'CMAKE_INSTALL_PREFIX': self.option('prefix'),
|
||||
}
|
||||
|
||||
# Hacks to add thriftpy3 support
|
||||
if 'BUILD_THRIFT_PY3' in os.environ and 'folly' in name:
|
||||
cmake_defines['PYTHON_EXTENSIONS'] = 'True'
|
||||
|
||||
if 'BUILD_THRIFT_PY3' in os.environ and 'fbthrift' in name:
|
||||
cmake_defines['thriftpy3'] = 'ON'
|
||||
|
||||
cmake_defines.update(
|
||||
self.option('{0}:cmake_defines'.format(name), {})
|
||||
)
|
||||
|
Reference in New Issue
Block a user