Skip to content

Commit

Permalink
Removing 'PIP_REQ_TRACKER' from the environment variables before exec…
Browse files Browse the repository at this point in the history
…ution of each pip command.

When populated by one `pip_main` call, the variable remains in the environment properties for all subsequent calls, wreaking havoc since the directory is subsequently deleted.
Should be removed once fixed in `pip`, but will remain until then.

Also removed testing for py33 as pip 18.1 demands 3.4.
  • Loading branch information
safiyat committed Nov 9, 2018
1 parent ea975cf commit 0972eaf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ matrix:
include:
- python: 2.7
env: TOX_ENV=py27
- python: 3.3
env: TOX_ENV=py33
- python: 3.4
env: TOX_ENV=py34
- python: 3.5
env: TOX_ENV=py35
- python: pypy
Expand Down
4 changes: 4 additions & 0 deletions libpip2pi/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ def pip_run_command(pip_args):
if pip_version < (1, 1):
raise RuntimeError("pip >= 1.1 required, but %s is installed"
%(pip_version, ))
# TODO: Remove this once
# pip._internal.req.req_tracker.RequirementTracker.cleanup() does it
# already.
os.environ.pop('PIP_REQ_TRACKER', None)
res = pip_main(pip_args)
if res != 0:
raise PipError("pip failed with status %s while running: %s"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{27,33,35}-pip{6,7,8}, pypy
envlist = py{27,34,35}-pip{6,7,8}, pypy

[testenv]
deps =
Expand Down

0 comments on commit 0972eaf

Please sign in to comment.