changed scope of original_sys_info

This commit is contained in:
Erin O'Connell
2017-09-14 02:34:34 -06:00
parent a38e80a29d
commit c9ac9431f0
+3 -2
View File
@@ -45,16 +45,17 @@ def resolve_deps(deps, sources=None, verbose=False, python=False):
"""Given a list of dependencies, return a resolved list of dependencies,
using pip-tools -- and their hashes, using the warehouse API / pip.
"""
# If a version of python is required...
original_sys_info = sys.version_info
if python:
original_sys_info = sys.version_info
sys.version_info = namedtuple('fake_version_info', ['major', 'minor', 'micro', 'releaselevel', 'serial'])
python = python.split('.')
# Hack sys.version_info to contain our information instead...
sys.version_info = sys.version_info(int(python[0]), int(python[1]), int(python[2]), 'final', 0)
else:
import pip