Search code examples
pythonpiptox

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

  • 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}