I'm just "converting" from pip to pdm, and find that the installation instruction of this project is not accurate.
It says, install pip install tox-pdmORpdm add -d tox-pdm.
However, adding tox-pdm to pdm itself will not help, as tox will not find it.
Still there's a chance that I'm missing something, but for me the only way to get tox to know the tox=pdm plugin is to install it at system level. Also manually in a virtualenv won't work, because tox is using it's own virtualenvs.
pip install --break-system-packages tox-pdm
I guess there is nothing the plugin can do about, but at least that should be updated in the README.md with a note that it has to be the system pip to install tox-pdm in.
I'm happy to file PRs if you agree, otherwise I'd be more than happy to learn about other ways to get this to work.
Update
I'm just finding out more about this...
This works: install pdm in it's venv, then run tox in the venv:
# not in an venv
pdm install
$(pdm venv activate)
tox -r
Somehow this works - there is no pip in that venv, but tox sees tox-pdm and installs the deps.
This does not work: activate a venv, install pdm in the venv, run tox:
virtualenv .venv && source .venv/bin/activate
pdm install
# pip freeze shows that tox-pdm ins installed in pip
tox -r
Even though tox-pdm is installed in pip of the venv, tox doesn't seem to see it. Probably because as I said above, tox is using it's own venv.
Sorry for the noise - this seems more complicated than I though, and probably there is a lot to understand first about pdm works differently with virtualenvs than what pip does. Feel free to close this if that is all as expected.
I'm just "converting" from
pip
topdm
, and find that the installation instruction of this project is not accurate.It says, install
pip install tox-pdm
ORpdm add -d tox-pdm
.However, adding
tox-pdm
topdm
itself will not help, astox
will not find it.Still there's a chance that I'm missing something, but for me the only way to get
tox
to know thetox=pdm
plugin is to install it at system level. Also manually in a virtualenv won't work, becausetox
is using it's own virtualenvs.I guess there is nothing the plugin can do about, but at least that should be updated in the
README.md
with a note that it has to be the systempip
to installtox-pdm
in.I'm happy to file PRs if you agree, otherwise I'd be more than happy to learn about other ways to get this to work.
Update
I'm just finding out more about this...
This works: install pdm in it's venv, then run tox in the venv:
Somehow this works - there is no
pip
in that venv, buttox
seestox-pdm
and installs the deps.This does not work: activate a venv, install pdm in the venv, run tox:
Even though
tox-pdm
is installed inpip
of the venv,tox
doesn't seem to see it. Probably because as I said above,tox
is using it's own venv.Sorry for the noise - this seems more complicated than I though, and probably there is a lot to understand first about
pdm
works differently with virtualenvs than whatpip
does. Feel free to close this if that is all as expected.