Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run python in isolate mode #35990

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/vcpkg-get-python-packages/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand All @@ -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()
Expand Down
6 changes: 5 additions & 1 deletion scripts/cmake/vcpkg_find_acquire_program.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8837,7 +8837,7 @@
"port-version": 0
},
"vcpkg-get-python-packages": {
"baseline": "2023-07-28",
"baseline": "2024-01-02",
"port-version": 0
},
"vcpkg-gfortran": {
Expand Down
5 changes: 5 additions & 0 deletions versions/v-/vcpkg-get-python-packages.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b6f23effcf3057ccc837f864b9207b651209e608",
"version-date": "2024-01-02",
"port-version": 0
},
{
"git-tree": "80e0cf9d38d72126b34eb1ee9b33f936c778a696",
"version-date": "2023-07-28",
Expand Down
Loading