From e3e3caeba4aebd68dc301b23e89dc4f78d708d15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simo=20Fa=CC=88lt?= Date: Mon, 27 Aug 2018 09:19:08 +0300 Subject: Add python wrapper to call native tools To install command to path, we need a python script which can be used as an entry point in setup.py . This is sufficient. On Windows, setuptools takes care of creating executable files which are inserted into the "Scripts" folder. Task-number: PYSIDE-779 Change-Id: Ic81087e10dfd98af65dfe07a68f351fca9f8637a Reviewed-by: Friedemann Kleint --- CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d328654..5bb2f9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,12 +43,6 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pyside2-uic GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ) -# on win32 we cannot rely on the shebang for the shell to interpret the pyside2-uic command -if (WIN32) - file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/pyside2-uic.bat "python %~dp0pyside2-uic %*\n") - install (FILES ${CMAKE_CURRENT_BINARY_DIR}/pyside2-uic.bat DESTINATION bin) -endif () - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pyside2uic/__init__.py" DESTINATION "${SITE_PACKAGE}/pyside2uic") install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pyside2uic @@ -85,6 +79,14 @@ set(PYSIDE2RCC_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/pyrcc/pyside2-rcc) add_subdirectory(pyrcc) add_subdirectory(pylupdate) +# pyside2-rcc, shiboken and pyside2-lupdate entrypoints +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pyside_tool.py + DESTINATION bin + PERMISSIONS + OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ + WORLD_EXECUTE WORLD_READ) + if (BUILD_TESTS) enable_testing() add_subdirectory(tests) -- cgit v1.2.3