python - 如何告诉 tox 使用受信任的主机和索引?

我使用 pip3 的以下用法从我的主机安装模块:

pip3 install tox -i http://myhost/sample+ --trusted-host

我下载了一个沼泽代码。它使用 tox 安装模块。

我如何告诉 tox 使用 myhost 安装模块?

回答1

您可以使用 tox 中的 https://tox.wiki/en/latest/config.html#conf-install_command 选项。

这应该会在您的 tox.ini 配置中产生这样的命令:

[testenv:your_env]
install_command=pip install --index-url=http://myhost/sample+ --trusted-host=http://myhost/sample+ {opts} {packages}

相似文章

随机推荐

最新文章