Skip to content

Commit b571a14

Browse files
committed
Pass proxy information to uv
If using uv, run it in a clean environment but include the variables that specify a proxy.
1 parent c08d5b4 commit b571a14

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

cmake/ActsCodegen.cmake

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,19 @@ function(acts_code_generation)
200200
file(MAKE_DIRECTORY ${_output_dir})
201201

202202
if(NOT ACTS_USE_SYSTEM_LIBS)
203+
# If using uv, run it in a clean environment but include the variables
204+
# that specify a proxy.
205+
set(_uv_environment UV_NO_CACHE=1)
206+
set(_propagate HTTP_PROXY HTTPS_PROXY ALL_PROXY NO_PROXY SSL_CERT_FILE)
207+
foreach(_var IN LISTS _propagate)
208+
if(DEFINED ENV{${_var}})
209+
list(APPEND _uv_environment "${_var}=$ENV{${_var}}")
210+
endif()
211+
endforeach()
203212
add_custom_command(
204213
OUTPUT ${_output_file}
205214
COMMAND
206-
env -i UV_NO_CACHE=1 ${uv_exe} run --quiet --python
215+
env -i ${_uv_environment} ${uv_exe} run --quiet --python
207216
${ARGS_PYTHON_VERSION} --no-project ${_arg_isolated}
208217
${_with_args} ${ARGS_PYTHON} ${_output_file}
209218
DEPENDS ${_depends}

0 commit comments

Comments
 (0)