-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix openr.thrift Python Module Build #96
Conversation
- Add a build_breeze.sh - Have a Docker file that only builds breeze - Make both Docker files use new build_breeze.sh so there is no copy pasta - Make a common.sh shareing what common code we can - Refactor thrift install into a seperate Docker step + scripts (out of setup.py) - Generate mstch_cpp2 + mstch_py3 TODO: Workout how to use cython to compule thrift.py.* + openr.thrift.* .so's Test Plan: - Bulld both containers - `breeze --help`
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Going to pull into Facebook to run CI there and hope we don't break anything.
|
||
# Cleanup all we can to keep container as lean as possible | ||
# TODO: We can use Dockerfile stages instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we really need to do this. Our image is way to big.
[ | ||
"cython3", | ||
"--fast-fail", | ||
"-3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this even an option anymore :P
if not fb303_py_pacakge_path.exists(): | ||
fb303_py_pacakge_path.symlink_to(fb_fb303_path) | ||
|
||
# TODO: Build thrift.py + py3 fb303 libraries ... :| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove / make accurate statement?
@cooperlees has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
This is merged FB OSS team ... :\ |
Closing (as it's merged) - I screwed up internal tooling editing commit mesages. |
[Open/R] Fix openr.thrift Python Module Build
Description:
Fixes #72