Skip to content

Commit

Permalink
[cmake] Remove hashbang from cp_rs python script, do not install it
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Sep 3, 2020
1 parent a03ba8f commit 8a9e8ea
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(scripts c++2py c++2rst c++2cxx cp_rs)
set(scripts c++2py c++2rst c++2cxx)

foreach(script ${scripts})
configure_file(${script}.in ${script} @ONLY)
Expand Down
2 changes: 0 additions & 2 deletions bin/cp_rs.in → bin/cp_rs.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!@PYTHON_EXECUTABLE@

# Acts as cp -rs on Linux
# Workaround for the absence of this option on OS X
# Usage cp_rs SRC DEST
Expand Down
3 changes: 0 additions & 3 deletions cmake/Cpp2PyConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ set_property(TARGET c++2rst PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_PREFIX@/b
add_executable(c++2cxx IMPORTED GLOBAL)
set_property(TARGET c++2cxx PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_PREFIX@/bin/c++2cxx")

add_executable(cp_rs IMPORTED GLOBAL)
set_property(TARGET cp_rs PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_PREFIX@/bin/cp_rs")

# include the exported targets of this project
include(@CMAKE_INSTALL_PREFIX@/lib/cmake/Cpp2Py/Cpp2PyTargets.cmake)

Expand Down
2 changes: 1 addition & 1 deletion cpp2py/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${DEST} FILES_MATCHING

# Link all files with relevant extensions into binary tree
# This allows us to get a working cpp2py Setup already after the build stage
execute_process(COMMAND ${PROJECT_BINARY_DIR}/bin/cp_rs ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} "py cxx rst")
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/bin/cp_rs.py ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} "py cxx rst")

###################################################################################
#
Expand Down
2 changes: 1 addition & 1 deletion cpp2rst/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${DEST} FILES_MATCHING

# Link all files with relevant extensions into binary tree
# This allows us to get a working cpp2py Setup already after the build stage
execute_process(COMMAND ${PROJECT_BINARY_DIR}/bin/cp_rs ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} "py")
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/bin/cp_rs.py ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} "py")

0 comments on commit 8a9e8ea

Please sign in to comment.