mirror of
https://github.com/microsoft/vcpkg
synced 2024-11-20 16:06:00 -07:00
Run python in isolate mode (#35990)
* Run python in isolate mode. * v db
This commit is contained in:
parent
83444c5775
commit
02286a84c7
5 changed files with 15 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "vcpkg-get-python-packages",
|
||||
"version-date": "2023-07-28",
|
||||
"version-date": "2024-01-02",
|
||||
"documentation": "https://vcpkg.io/en/docs/README.html",
|
||||
"license": "MIT",
|
||||
"supports": "native"
|
||||
|
|
|
@ -91,7 +91,7 @@ function(x_vcpkg_get_python_packages)
|
|||
|
||||
set(ENV{PYTHONNOUSERSITE} "1")
|
||||
message(STATUS "Setting up python virtual environmnent...")
|
||||
vcpkg_execute_required_process(COMMAND "${arg_PYTHON_EXECUTABLE}" -m "${python_venv}" ${python_venv_options} "${venv_path}"
|
||||
vcpkg_execute_required_process(COMMAND "${arg_PYTHON_EXECUTABLE}" -I -m "${python_venv}" ${python_venv_options} "${venv_path}"
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "venv-setup-${TARGET_TRIPLET}")
|
||||
vcpkg_add_to_path(PREPEND "${venv_path}${python_sub_path}")
|
||||
|
@ -101,13 +101,13 @@ function(x_vcpkg_get_python_packages)
|
|||
unset(ENV{PYTHONPATH})
|
||||
if(DEFINED arg_REQUIREMENTS_FILE)
|
||||
message(STATUS "Installing requirements from: ${arg_REQUIREMENTS_FILE}")
|
||||
vcpkg_execute_required_process(COMMAND "${${arg_OUT_PYTHON_VAR}}" -m pip install -r ${arg_REQUIREMENTS_FILE}
|
||||
vcpkg_execute_required_process(COMMAND "${${arg_OUT_PYTHON_VAR}}" -I -m pip install -r ${arg_REQUIREMENTS_FILE}
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "pip-install-requirements-file-${TARGET_TRIPLET}")
|
||||
endif()
|
||||
if(DEFINED arg_PACKAGES)
|
||||
message(STATUS "Installing python packages: ${arg_PACKAGES}")
|
||||
vcpkg_execute_required_process(COMMAND "${${arg_OUT_PYTHON_VAR}}" -m pip install ${arg_PACKAGES}
|
||||
vcpkg_execute_required_process(COMMAND "${${arg_OUT_PYTHON_VAR}}" -I -m pip install ${arg_PACKAGES}
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "pip-install-packages-${TARGET_TRIPLET}")
|
||||
endif()
|
||||
|
|
|
@ -84,7 +84,11 @@ function(z_vcpkg_find_acquire_program_find_internal program)
|
|||
PATHS ${arg_PATHS}
|
||||
NO_DEFAULT_PATH)
|
||||
if(SCRIPT_${program})
|
||||
set("${program}" ${${arg_INTERPRETER}} ${SCRIPT_${program}} CACHE INTERNAL "")
|
||||
if(arg_INTERPRETER MATCHES "PYTHON")
|
||||
set("${program}" ${${arg_INTERPRETER}} -I ${SCRIPT_${program}} CACHE INTERNAL "")
|
||||
else()
|
||||
set("${program}" ${${arg_INTERPRETER}} ${SCRIPT_${program}} CACHE INTERNAL "")
|
||||
endif()
|
||||
endif()
|
||||
unset(SCRIPT_${program} CACHE)
|
||||
endif()
|
||||
|
|
|
@ -8857,7 +8857,7 @@
|
|||
"port-version": 0
|
||||
},
|
||||
"vcpkg-get-python-packages": {
|
||||
"baseline": "2023-07-28",
|
||||
"baseline": "2024-01-02",
|
||||
"port-version": 0
|
||||
},
|
||||
"vcpkg-gfortran": {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "b6f23effcf3057ccc837f864b9207b651209e608",
|
||||
"version-date": "2024-01-02",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "80e0cf9d38d72126b34eb1ee9b33f936c778a696",
|
||||
"version-date": "2023-07-28",
|
||||
|
|
Loading…
Reference in a new issue