Skip to content

Commit 2cc6347

Browse files
committed
Support :native_tls in compile-time config
1 parent c45963b commit 2cc6347

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/pythonx/application.ex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@ defmodule Pythonx.Application do
2323

2424
# If configured, we fetch Python and dependencies at compile time
2525
# and we automatically initialize the interpreter on boot.
26-
uv_init_env = Application.compile_env(:pythonx, :uv_init)
26+
uv_init_env = Application.compile_env(:pythonx, :uv_init, [])
2727
pyproject_toml = uv_init_env[:pyproject_toml]
2828
uv_version = uv_init_env[:uv_version] || Pythonx.Uv.default_uv_version()
29-
python = uv_init_env[:python]
30-
opts = [uv_version: uv_version, python: python]
29+
30+
opts = [uv_version: uv_version] ++ Keyword.take(uv_init_env, [:python, :native_tls])
31+
init_opts = Keyword.take(opts, [:uv_version, :python])
3132

3233
if pyproject_toml do
3334
Pythonx.Uv.fetch(pyproject_toml, true, opts)
34-
defp maybe_uv_init(), do: Pythonx.Uv.init(unquote(pyproject_toml), true, unquote(opts))
35+
defp maybe_uv_init(), do: Pythonx.Uv.init(unquote(pyproject_toml), true, unquote(init_opts))
3536
else
3637
defp maybe_uv_init(), do: Pythonx.maybe_init_from_env()
3738
end

0 commit comments

Comments
 (0)