@@ -10,7 +10,8 @@ defmodule Pythonx.Uv do
1010 """
1111 @ spec fetch ( String . t ( ) , boolean ( ) , keyword ( ) ) :: :ok
1212 def fetch ( pyproject_toml , priv? , opts \\ [ ] ) do
13- opts = Keyword . validate! ( opts , force: false , uv_version: default_uv_version ( ) )
13+ opts =
14+ Keyword . validate! ( opts , force: false , uv_version: default_uv_version ( ) , native_tls: false )
1415
1516 project_dir = project_dir ( pyproject_toml , priv? , opts [ :uv_version ] )
1617 python_install_dir = python_install_dir ( priv? , opts [ :uv_version ] )
@@ -28,7 +29,10 @@ defmodule Pythonx.Uv do
2829 File . write! ( Path . join ( project_dir , "pyproject.toml" ) , pyproject_toml )
2930
3031 # We always use uv-managed Python, so the paths are predictable.
31- if run! ( [ "sync" , "--managed-python" , "--no-config" ] ,
32+ base_args = [ "sync" , "--managed-python" , "--no-config" ]
33+ uv_args = if opts [ :native_tls ] , do: base_args ++ [ "--native-tls" ] , else: base_args
34+
35+ if run! ( uv_args ,
3236 cd: project_dir ,
3337 env: % { "UV_PYTHON_INSTALL_DIR" => python_install_dir } ,
3438 uv_version: opts [ :uv_version ]
0 commit comments