'How to tell to tox use trusted host and index?

I use the following usage for pip3 to install modules from my host:

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

I downloaded a bog code.It uses tox for installing modules.
How can I tell to tox use myhost for installing modules?



Solution 1:[1]

You can use the install_command option from tox.

This should result in a command like this within your tox.ini configuration:

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1