mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Don't write editable requirements to a temporary file
We never need to read from the file, so it's unnecessary.
This commit is contained in:
+3
-4
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user