Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose virtualenv --no-download somewhere in tox ini #497

Closed
rogalski opened this issue Mar 28, 2017 · 8 comments
Closed

Expose virtualenv --no-download somewhere in tox ini #497

rogalski opened this issue Mar 28, 2017 · 8 comments

Comments

@rogalski
Copy link

I work in environment where local PyPI mirror is used. I set non-standard index server in [tox] section of tox.ini file and it works fine when existing virtualenv is reused. When new virtualenv is created, it still attempts to connect to standard PyPI server (see create_environment and install_wheel functions). It spends long time there and eventually get timed out. While virtualenv is still created successfully, long timeout is certainly unexpected behavior.

It could either be done explicitly (something along the lines of virtualenv_custom_args [text], virtualenv_no_download [bool] option), or maybe implicitly (add --no-download when custom index server is defined)

I'd like to get some input before I'll start to work on a PR.

@obestwalter obestwalter added enhancement needs:discussion It's not quite clear if and how this should be done and removed enhancement labels Mar 28, 2017
@obestwalter
Copy link
Member

obestwalter commented Mar 28, 2017

@rogalski - interesting. I have the same set up at work and have never noticed that problem. Maybe this is because I have set my pip.conf like this?

[global]
index-url = https://pypi.python.org/simple/
extra-index-url = <company devpi server>

I did that ages ago, before we actually had added the company index to the tox inis, so I will have try this out, how tox behaves with that extra hint for pip.

Edit maybe it is not the same setup after all, as you have a local Pypi mirror and not a devpi server ...

@rogalski
Copy link
Author

Using code below in tox.ini seems to do the job:

setenv = 
             VIRTUALENV_DOWNLOAD=0

@asottile
Copy link
Contributor

Duplicates #446 I believe?

@obestwalter
Copy link
Member

@asottile I think you wanted to type something else (#446 is about running Travis on Mac), which issue did you mean?

@asottile
Copy link
Contributor

asottile commented Apr 1, 2017

Indeed #448 is the one I was thinking of

@rogalski
Copy link
Author

rogalski commented Apr 1, 2017

Any extra actions required on my side for removing an incomplete tag?

@obestwalter
Copy link
Member

So if I understand it correctly this is indeed a dupe of #448, so I'd say we close this and the discussion how to improve the situation can be followed up there ...

@obestwalter obestwalter added enhancement and removed bug needs:discussion It's not quite clear if and how this should be done labels Apr 1, 2017
@asottile
Copy link
Contributor

I made a plugin to turn virtualenv's behaviour off entirely: https://github.com/asottile/tox-virtualenv-no-download

@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants