diff --git a/pipenv/utils.py b/pipenv/utils.py index 2b8c87f2..82cff759 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -462,13 +462,12 @@ def actually_resolve_reps(deps, index_lookup, markers_lookup, project, sources, constraints = [] for dep in deps: - t = tempfile.mkstemp(prefix='pipenv-', suffix='-requirement.txt')[1] - with open(t, 'w') as f: - f.write(dep) - if dep.startswith('-e '): constraint = pip.req.InstallRequirement.from_editable(dep[len('-e '):]) else: + t = tempfile.mkstemp(prefix='pipenv-', suffix='-requirement.txt')[1] + with open(t, 'w') as f: + f.write(dep) constraint = [c for c in pip.req.parse_requirements(t, session=pip._vendor.requests)][0] if ' -i ' in dep: diff --git a/tests/test_pipenv.py b/tests/test_pipenv.py index d2ef07a1..a5d6220e 100644 --- a/tests/test_pipenv.py +++ b/tests/test_pipenv.py @@ -435,6 +435,7 @@ setup( assert 'idna' in p.lockfile['default'] assert 'urllib3' in p.lockfile['default'] assert 'certifi' in p.lockfile['default'] + assert os.listdir(p.tmpdir) == [] @pytest.mark.install @pytest.mark.pin