• Ahmed Soliman's avatar
    Fixing fbthrift and folly cython bindings build · b1211e4c
    Ahmed Soliman authored
    Summary:
    This diff addresses a collection of issues with our thrift-py3 build story in open source.
    - Cython 0.29 bug https://github.com/cython/cython/issues/2985 prevents us from loading the generated binary python extensions. I've tested 0.28.6 and it works perfectly.
    - Adds ssl to the extensions (since we need SSLContext in get_client, we must have access to the module)
    - No need to special case folly_pic. There is really no easy way to get the python bindings to work without using shared library libfolly.so. So, In our build (logdevice) we will build folly as a shared library, this also reduces the complexity everywhere.
    - We also need iobuf as extension for thrift to work, added that to setup.py
    - Refactored some of the CMake code that had hardcoded file names to use globbing to future-proof this as much as possible.
    - Moved `python/lang/cast.pxd` to match the python module name `folly.cast`, so now it lives in `python/cast.pxd`. This simplifies the globbing as well.
    - Moved `setup.py` to live in the `/python` directory.
    - Added `*.py` in setup.py to pickup any raw python code (including `__init__.py`)
    
    Reviewed By: yfeldblum
    
    Differential Revision: D18685009
    
    fbshipit-source-id: 749b30942a3e5e9e314b5248cc0aa90c6ac1581f
    b1211e4c
setup.py 1.45 KB