How to tell toxicity to use PyPI mirrors to install packages?

Is there any way to tell the tox testing automation tox use PyPI mirrors when installing all packages (explicit testing of dependencies in tox.ini and dependencies on setup.py )?

For example, pip install has a very useful option --use-mirrors , which adds mirrors to the list of package servers.

+4
source share
2 answers

The pip can also be configured using environment variables that tox allows you to set in the configuration

 setenv = PIP_USE_MIRRORS=... 

Alternatively, you can specify the series of index servers to use :

 indexserver = default = http://mypypi.org foobar = http://otherpypi.org 

default is the default index server, but other names can be used to retrieve the dependencies in the deps list from specific servers:

 deps = :foobar:ham-spam-pkg 
+6
source

Tox can be configured to install dependencies and packages from another default PyPI server:

  • as a command line argument to define

     tox -i http://pypi.my-alternative-index.org 
  • using tox.ini

     [tox] indexserver = default = http://pypi.my-alternative-index.org 

Link to Tox documentation on using a different default PyPI URL

0
source

Source: https://habr.com/ru/post/1479995/


All Articles