Replies: 1 comment 2 replies
-
The plugin route is supported, just under documented 👍 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using Tox to test a package let's call
A
(for clarity), which has an optional dependency on packageB
, which in turn depends onA
. One of my Tox environments installsA
using an extra that also pulls inB
. Whilepip install A[extra]
works just fine, aspip
knows how to deal with the cyclic dependency, Tox's 2-step method of first installingA
's dependencies and then using a secondpip
command forA
itself doesn't always work. In particular, the following can happen:install_package_deps
stage, Tox usespip
to installB
, andpip
starts searching PyPI for a compatible version ofA
to install (as it doesn't know that Tox will separately installA
later).A
I'm developing have changed, there may be no compatible versions on PyPI already, so the installation fails.I'm currently working around this issue by using a Tox plugin to add an additional installation stage which installs
A
(with the--no-deps
option) before theinstall_package_deps
stage, so that during that stagepip
's resolver will know the newer version ofA
is available:Plugin code
This approach is fragile (I'm using some undocumented Tox APIs), and still has the issue that
A
andB
are installed in separatepip
commands, so dependency conflicts could be missed.My questions are:
pip
command to install both the built package and its dependencies? That would solve the cyclic dependency problem.Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions