File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -104,15 +104,16 @@ Configure the desired Python version and dependencies in your
104104``` elixir
105105import Config
106106
107- config :pythonx , :uv_pyproject_toml , """
108- [project]
109- name = "project"
110- version = "0.0.0"
111- requires-python = "==3.13.*"
112- dependencies = [
113- "numpy==2.2.2"
114- ]
115- """
107+ config :pythonx , :uv ,
108+ pyproject_toml: """
109+ [project]
110+ name = "project"
111+ version = "0.0.0"
112+ requires-python = "==3.13.*"
113+ dependencies = [
114+ "numpy==2.2.2"
115+ ]
116+ """
116117```
117118
118119With that, you can use ` Pythonx.eval/2 ` and other APIs in your
Original file line number Diff line number Diff line change @@ -20,14 +20,14 @@ defmodule Pythonx.Application do
2020
2121 # If configured, Python and dependencies are fetched at compile time,
2222 # so we automatically initialize the interpreter on boot.
23- if pyproject_toml = Application . compile_env ( :pythonx , :uv_pyproject_toml ) do
23+ if pyproject_toml = Application . compile_env ( :pythonx , :uv ) [ :pyproject_toml ] do
2424 defp maybe_uv_init ( ) , do: Pythonx.Uv . init ( unquote ( pyproject_toml ) , true )
2525 else
2626 defp maybe_uv_init ( ) , do: :noop
2727 end
2828end
2929
3030# If configured, fetch Python and dependencies when compiling.
31- if pyproject_toml = Application . compile_env ( :pythonx , :uv_pyproject_toml ) do
31+ if pyproject_toml = Application . compile_env ( :pythonx , :uv ) [ :pyproject_toml ] do
3232 Pythonx.Uv . fetch ( pyproject_toml , true )
3333end
You can’t perform that action at this time.
0 commit comments