diff options
| author | cskrisz <cskrisztianster@gmail.com> | 2019-07-02 22:47:50 +0200 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2019-07-02 13:47:50 -0700 |
| commit | 4642a4fc6c4437b7d68294ab4e34d3fe38051244 (patch) | |
| tree | fa64fb8f69a6f94ad922c8220c94a17fe4511838 /scripts | |
| parent | f15d52becf620a0b234b4b7735579b5415f8d7b7 (diff) | |
| download | vcpkg-4642a4fc6c4437b7d68294ab4e34d3fe38051244.tar.gz vcpkg-4642a4fc6c4437b7d68294ab4e34d3fe38051244.zip | |
Fix Python3 tool on Windows (#7051)
* Delete python37._pth from python3-embed
* Add version number to SUBDIR
* [open62541] Use Python in version subdir
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/cmake/vcpkg_find_acquire_program.cmake | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 0399fc50c..fcfa6d0a1 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -45,6 +45,7 @@ function(vcpkg_find_acquire_program VAR) unset(_vfa_RENAME) unset(SUBDIR) unset(REQUIRED_INTERPRETER) + unset(POST_INSTALL_COMMAND) vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS) vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) @@ -77,11 +78,12 @@ function(vcpkg_find_acquire_program VAR) elseif(VAR MATCHES "PYTHON3") if(CMAKE_HOST_WIN32) set(PROGNAME python) - set(SUBDIR "python3") + set(SUBDIR "python-3.7.3") set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR}) set(URL "https://www.python.org/ftp/python/3.7.3/python-3.7.3-embed-win32.zip") set(ARCHIVE "python-3.7.3-embed-win32.zip") set(HASH 2c1b1f0a29d40a91771ae21a5f733eedc10984cd182cb10c2793bbd24191a89f20612a3f23c34047f37fb06369016bfd4a52915ed1b4a56f8bd2b4ca6994eb31) + set(POST_INSTALL_COMMAND ${CMAKE_COMMAND} -E remove python37._pth) else() set(PROGNAME python3) set(BREW_PACKAGE_NAME "python") @@ -291,6 +293,14 @@ function(vcpkg_find_acquire_program VAR) endif() endif() + if(DEFINED POST_INSTALL_COMMAND) + vcpkg_execute_required_process( + COMMAND ${POST_INSTALL_COMMAND} + WORKING_DIRECTORY ${PROG_PATH_SUBDIR} + LOGNAME ${VAR}-tool-post-install + ) + endif() + do_find() endif() |
