You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2019/08/12 17:43:17 UTC

[qpid-proton] branch master updated: PROTON-2088: Copy python files to dist area at build time rather than configure time

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


The following commit(s) were added to refs/heads/master by this push:
     new c4d1e8a  PROTON-2088: Copy python files to dist area at build time rather than configure time
c4d1e8a is described below

commit c4d1e8a17112030604bd228694e259c613b965d8
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Mon Aug 12 13:22:15 2019 -0400

    PROTON-2088: Copy python files to dist area at build time rather than configure time
---
 python/CMakeLists.txt | 34 +++++++++++++++++++++-------------
 1 file changed, 21 insertions(+), 13 deletions(-)

diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 9040af4..bfe4fc3 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -93,7 +93,10 @@ set (pysrc
 set(py_dist_files
     cproton.i
     MANIFEST.in
-    setuputils
+    setuputils/__init__.py
+    setuputils/log.py
+    setuputils/misc.py
+    setuputils/PYZMQ_LICENSE.BSD
     docs
     )
 
@@ -165,15 +168,16 @@ set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "html;tutorial")
 
 set(py_dist_dir ${CMAKE_CURRENT_BINARY_DIR}/dist)
 
-file(COPY ${py_dist_files} DESTINATION ${py_dist_dir})
-
-file(MAKE_DIRECTORY ${py_dist_dir}/proton)
-file(COPY ${pysrc} DESTINATION ${py_dist_dir}/proton)
-
 add_custom_target(py_src_dist ALL)
 add_dependencies(py_src_dist generated_c_files)
 
-file(MAKE_DIRECTORY ${py_dist_dir})
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README.rst.in
+               ${CMAKE_CURRENT_BINARY_DIR}/README.rst
+)
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in
+               ${CMAKE_CURRENT_BINARY_DIR}/setup.py
+)
 
 add_custom_command(TARGET py_src_dist
                    COMMAND ${CMAKE_COMMAND} -E copy_directory ${PN_C_INCLUDE_DIR} "${py_dist_dir}/include")
@@ -181,12 +185,16 @@ add_custom_command(TARGET py_src_dist
 add_custom_command(TARGET py_src_dist
                    COMMAND ${CMAKE_COMMAND} -E copy_directory ${PN_C_SOURCE_DIR} "${py_dist_dir}/src")
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in
-               ${py_dist_dir}/setup.py
-)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README.rst.in
-               ${py_dist_dir}/README.rst
-)
+add_custom_command(TARGET py_src_dist
+                   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/README.rst "${py_dist_dir}")
+
+add_custom_command(TARGET py_src_dist
+                   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/setup.py "${py_dist_dir}")
+
+foreach(file IN LISTS py_dist_files pysrc)
+add_custom_command(TARGET py_src_dist
+                   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${file} "${py_dist_dir}/${file}")
+endforeach()
 
 # python test: python/tests/proton-test
 set (py_src "${CMAKE_CURRENT_SOURCE_DIR}")


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org