-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Tox plugin to work around cyclic dependency on verifai (#251)
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import tox.plugin | ||
|
||
|
||
@tox.plugin.impl | ||
def tox_on_install(tox_env, arguments, section, of_type): | ||
# Add extra installation stage to install Scenic *before* its dependencies, | ||
# so that if we install VerifAI we won't pull in a different version of | ||
# Scenic that might have different dependencies. (This is currently | ||
# necessary since Tox installs the dependencies and Scenic in 2 different | ||
# invocations of pip. See https://github.com/tox-dev/tox/discussions/3273 | ||
# for a discussion.) | ||
if section == "RunToxEnv" and of_type == "package": | ||
assert len(arguments) == 1 | ||
package = arguments[0] | ||
path = package.path | ||
install_args = ["--force-reinstall", "--no-deps", str(path)] | ||
tox_env.installer._execute_installer(install_args, "package_early") |