Skip to content

Commit 8a9e8ea

Browse files
committed
[cmake] Remove hashbang from cp_rs python script, do not install it
1 parent a03ba8f commit 8a9e8ea

File tree

5 files changed

+3
-8
lines changed

5 files changed

+3
-8
lines changed

bin/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(scripts c++2py c++2rst c++2cxx cp_rs)
1+
set(scripts c++2py c++2rst c++2cxx)
22

33
foreach(script ${scripts})
44
configure_file(${script}.in ${script} @ONLY)

bin/cp_rs.in renamed to bin/cp_rs.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!@PYTHON_EXECUTABLE@
2-
31
# Acts as cp -rs on Linux
42
# Workaround for the absence of this option on OS X
53
# Usage cp_rs SRC DEST

cmake/Cpp2PyConfig.cmake.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ set_property(TARGET c++2rst PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_PREFIX@/b
4141
add_executable(c++2cxx IMPORTED GLOBAL)
4242
set_property(TARGET c++2cxx PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_PREFIX@/bin/c++2cxx")
4343

44-
add_executable(cp_rs IMPORTED GLOBAL)
45-
set_property(TARGET cp_rs PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_PREFIX@/bin/cp_rs")
46-
4744
# include the exported targets of this project
4845
include(@CMAKE_INSTALL_PREFIX@/lib/cmake/Cpp2Py/Cpp2PyTargets.cmake)
4946

cpp2py/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${DEST} FILES_MATCHING
77

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

1212
###################################################################################
1313
#

cpp2rst/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${DEST} FILES_MATCHING
44

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

0 commit comments

Comments
 (0)