mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 08:08:59 +08:00
Merge pull request #1829 from glachancecmaisonneuve/find_acquire_python2
find_acquire_program (python2)
This commit is contained in:
commit
4f27ff859f
@ -66,31 +66,19 @@ function(vcpkg_find_acquire_program VAR)
|
||||
set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720)
|
||||
elseif(VAR MATCHES "PYTHON3")
|
||||
set(PROGNAME python)
|
||||
set(PATHS ${DOWNLOADS}/tools/python)
|
||||
set(SUBDIR "python3")
|
||||
set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR})
|
||||
set(URL "https://www.python.org/ftp/python/3.5.4/python-3.5.4-embed-win32.zip")
|
||||
set(ARCHIVE "python-3.5.4-embed-win32.zip")
|
||||
set(HASH b5240fdc95088c2d7f65d2dd598650f8dd106b49589d94156bd4a078b108c6cabbe7a38ef73e2b2cf00e8312a93d2e587eac2c54ce85540d3c7a26cc60013156)
|
||||
elseif(VAR MATCHES "PYTHON2")
|
||||
find_program(PYTHON2 NAMES python2 python PATHS C:/python27 c:/Python27amd64 ENV PYTHON)
|
||||
if(NOT PYTHON2 MATCHES "NOTFOUND")
|
||||
execute_process(
|
||||
COMMAND ${PYTHON2} --version
|
||||
OUTPUT_VARIABLE PYTHON_VER_CHECK_OUT
|
||||
ERROR_VARIABLE PYTHON_VER_CHECK_ERR
|
||||
)
|
||||
set(PYTHON_VER_CHECK "${PYTHON_VER_CHECK_OUT}${PYTHON_VER_CHECK_ERR}")
|
||||
debug_message("PYTHON_VER_CHECK=${PYTHON_VER_CHECK}")
|
||||
if(NOT PYTHON_VER_CHECK MATCHES "Python 2.7")
|
||||
set(PYTHON2 PYTHON2-NOTFOUND)
|
||||
find_program(PYTHON2 NAMES python2 python PATHS C:/python27 ENV PYTHON NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
endif()
|
||||
endif()
|
||||
if(PYTHON2 MATCHES "NOTFOUND")
|
||||
message(FATAL_ERROR "Python 2.7 was not found in the path or by searching inside C:\\Python27.\n"
|
||||
"There is no portable redistributable for Python 2.7, so you will need to install the MSI located at:\n"
|
||||
" https://www.python.org/ftp/python/2.7.13/python-2.7.13.msi\n"
|
||||
)
|
||||
endif()
|
||||
set(PROGNAME python)
|
||||
set(SUBDIR "python2")
|
||||
set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR})
|
||||
file(TO_NATIVE_PATH "${PATHS}" DESTINATION_NATIVE_PATH)
|
||||
set(URL "https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi")
|
||||
set(ARCHIVE "python2.msi")
|
||||
set(HASH 8c3ad6e527742d99ba96dcfd1098861b14e7207b80d51a54e9b410ab2f36e44e05561ea1527d8e92b3e10808311536260bd9e82db0da3b513fb1be18e108510e)
|
||||
elseif(VAR MATCHES "RUBY")
|
||||
set(PROGNAME "ruby")
|
||||
set(PATHS ${DOWNLOADS}/tools/ruby/rubyinstaller-2.4.1-1-x86/bin)
|
||||
|
Loading…
Reference in New Issue
Block a user