BewareMyPower opened a new pull request, #23: URL: https://github.com/apache/pulsar-client-python/pull/23
Fixes https://github.com/apache/pulsar-client-python/issues/7 ### Motivation The Python client cannot be built with MSVC. ### Modifications Add `vcpkg.json` to download the Boost.Python dependency. Then fix some CMake errors: 1. Boost.Python cannot be found on Windows. The component of Boost cannot be `python3`. It should be a specific version like `python310`. 2. Link to `pulsarWithDeps.lib` for MSVC and modify the compilation option from `/MD` to `/MT` when `LINK_STATIC` is `ON`. 3. When `LINK_STATIC` is `OFF` (by default), remove the suffix of the name because CMake will find the correct suffixes on different platforms. 4. Add the Python3 library to the target on Windows, otherwise the symbols cannot be found. Since Python on Windows can only recognize `*.pyd` suffix of a C extension, change the `CMAKE_SHARED_LIBRARY_SUFFIX` and use `_pulsar.pyd` in `setup.py` on Windows. Add README to tell users how to build Python client on Windows. ### TODO Add a GitHub Actions workflow to verify the Windows build. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
