This is an automated email from the ASF dual-hosted git repository. astitcher pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
commit 2551b78145cd643761ce8b50534fcdfa267e40b5 Author: Andrew Stitcher <[email protected]> AuthorDate: Mon Sep 16 15:57:21 2019 -0400 PROTON-2102: [Python] Build python source and binary packages - This is gated on the presence of the setuptools and/or the wheel python packages --- python/CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 6414a31..e076e0e 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -205,6 +205,22 @@ add_custom_command(TARGET py_src_dist COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${file} "${py_dist_dir}/${file}") endforeach() +# Make python source and binary packages if we have prerequisistes +check_python_module("setuptools" SETUPTOOLS_MODULE_FOUND) +check_python_module("wheel" WHEEL_MODULE_FOUND) +if (SETUPTOOLS_MODULE_FOUND) + add_custom_target(py_pkg_src ALL + WORKING_DIRECTORY dist + DEPENDS py_src_dist + COMMAND ${PYTHON_EXECUTABLE} setup.py sdist --dist-dir ${CMAKE_CURRENT_BINARY_DIR}/pkgs) + if (WHEEL_MODULE_FOUND) + add_custom_target(py_pkg_wheel ALL + WORKING_DIRECTORY dist + DEPENDS py_pkg_src + COMMAND ${PYTHON_EXECUTABLE} setup.py bdist_wheel --dist-dir ${CMAKE_CURRENT_BINARY_DIR}/pkgs) + endif () +endif () + # python test: python/tests/proton-test set (py_src "${CMAKE_CURRENT_SOURCE_DIR}") set (py_bin "${CMAKE_CURRENT_BINARY_DIR}") --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
