-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
Tox shouldn't call pip directly to avoid shebang limitations #66
Comments
Original comment by @hpk42 addresses issue66: add --workdir option to override where tox stores its ".tox" directory (experimental) New feature: When a search for a config file fails, tox tries loading → <<cset 11c13b4313a4>> |
1 similar comment
Original comment by @hpk42 addresses issue66: add --workdir option to override where tox stores its ".tox" directory (experimental) New feature: When a search for a config file fails, tox tries loading → <<cset 11c13b4313a4>> |
Original comment by @hpk42 So it turns out defaulting to "python -m pip" is a breaking change we cannot do. The problem is that this invocation adds the current working directory and this makes pip think a package is installed if it is in the invocation current working directory. You can change "install_command" to use "python -m pip" if that works for you (e.g. if you don't have packages in your root dir) or, probably a better idea, use the new "--workdir" option to have a tox working directory which is not deeply nested. The latter method has the added benefit that also all other invocations of scripts in a virtualenv will work. Even if we made "python -m pip" work you would still not be able to invoke other installed scripts in venvs that have too long path names. |
Original comment by @hpk42 fix issue66 by introducing using default "python -m pip" → <<cset 73d3b0cabef0>> |
Original comment by @hawkowl Yeah, I'm hitting this too on Twisted, as we try and move tox-first, including on the Windows builders. With the install_command workaround, it works better, but then fails right after with:
I believe https://bitbucket.org/hpk42/tox/pull-requests/172/do-not-call-pip-directly-trying-to-fix/diff should fix this issue. |
Original comment by gralamin This is still an issue I hit (running tox 1.7.2). Has this been fixed in any newer versions and missed being closed, or is it still an open defect? Thanks! |
Original comment by @hpk42 thanks for your perseverance! |
Original comment by @tabo Plan to do that tonight. I'm still cleaning up the mess I did including prints in the stdlib in that server while debugging this :) |
Original comment by @hpk42 could you prepare a patch including adapting tests? |
Just referencing other related issues in virtualenv and pip:
I'm still experiencing this problem when using tox through tox itself with long testenv names! |
Also includes minor change for tox working directory to move up one dir (build dir) for congress. This is due to tox-dev/tox#66 Removes networking_bgpvpn.conf, and uses neutron service_providers to set. This is because we do not have upstream patches to configure bgpvpn conf file via OOO and having 2 definitions breaks deploy. Change-Id: I9846bd959c1ed8e2e81f3ae30470ec357da3fc8f Signed-off-by: Tim Rozet <trozet@redhat.com>
For reference using install_command is not sufficient for this as there is a later call to pip freeze which is not customisable so for this to work we'd need to be able to also override the pip freeze call too. |
When the python interpreter for an environment is in a deep directory hierarchy (in my case due to a jenkins matrix with 4 axis), tox will make a pip call like:
The shebang in this file has the full path for the python interpreter in the virtualenv. In one of my failing tests it was:
With a path length of 131 that exceeds linux's limitation of 127. Patching tox to call
$PYTHON_BIN_PATH $PIP_BIN_PATH
instead of just$PIP_BIN_PATH
solves the problem.The text was updated successfully, but these errors were encountered: