You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if maturin develop --uv is used with an environment created with uv venv, the package is not installed in editable mode. This is likely because pip is not available in the environment and there is no fallback (but I'm not sure why fix_direct_url() isn't crashing).
Since uv 0.4.25 the tool has supported uv pip show --files so assuming maturin is OK with requiring at least this version, the fallback to always use pip in fix_direct_url() can be removed.
uv version: 0.5.5
Your maturin version (maturin --version)
maturin 1.7.6
Your Python version (python -V)
Python 3.12.2
Your pip version (pip -V)
pip 24.0
What bindings you're using
pyo3
Does cargo build work?
Yes, it works
If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?
Yes
Steps to Reproduce
The following script installs the foobar package in non-editable mode when USE_UV=1 and in editable mode when USE_UV=0 (the package is also installed in editable mode when using maturin develop --uv if the environment is created with venv):
set -e
OUT=/tmp/minimal
USE_UV=1
rm -rf $OUTif [ $USE_UV-eq 1 ];then
uv venv $OUT/venv
else
python -m venv $OUT/venv
fi.$OUT/venv/bin/activate
maturin new --name foobar --bindings pyo3 $OUT/foobar
cd$OUT/foobar
if [ $USE_UV-eq 1 ];then
maturin develop --uv
else
maturin develop
fi
uv pip list
The text was updated successfully, but these errors were encountered:
Before uv 0.4.25, `uv pip show` did not support the `--files` argument
which is required by `fix_direct_url`. Now that the flag is supported,
falling back to pip is not necessary.
Error handling is also improved. Previously if pip was not present in
the environment (which is the case for `uv venv`) no error was reported
to the user but `fix_direct_url` will have failed so the package is not
installed in editable mode.
fixes#2346
Bug Description
if
maturin develop --uv
is used with an environment created withuv venv
, the package is not installed in editable mode. This is likely becausepip
is not available in the environment and there is no fallback (but I'm not sure whyfix_direct_url()
isn't crashing).Since uv 0.4.25 the tool has supported
uv pip show --files
so assuming maturin is OK with requiring at least this version, the fallback to always use pip infix_direct_url()
can be removed.uv version:
0.5.5
Your maturin version (
maturin --version
)maturin 1.7.6
Your Python version (
python -V
)Python 3.12.2
Your pip version (
pip -V
)pip 24.0
What bindings you're using
pyo3
Does
cargo build
work?If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash
/
)?Steps to Reproduce
The following script installs the
foobar
package in non-editable mode whenUSE_UV=1
and in editable mode whenUSE_UV=0
(the package is also installed in editable mode when usingmaturin develop --uv
if the environment is created with venv):The text was updated successfully, but these errors were encountered: