mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
changed scope of original_sys_info
This commit is contained in:
+3
-2
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user