From d3a08878cf95edad541cede022b9aadb4dfe037b Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Sun, 1 Apr 2018 12:46:03 -0400 Subject: [PATCH] Fix marker parsing Signed-off-by: Dan Ryan --- pipenv/requirements.py | 5 ++++- tests/test_pipenv.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pipenv/requirements.py b/pipenv/requirements.py index cf733f57..90f1906a 100644 --- a/pipenv/requirements.py +++ b/pipenv/requirements.py @@ -130,7 +130,10 @@ class PipfileRequirement(object): if _extra_markers: markers = list(markers) if markers else [] for marker in _extra_markers: - markers.append(_pipfile.pop(marker)) + marker = marker.strip() + marker_value = _pipfile.pop(marker).strip() + marker_string = '{0}{1}'.format(marker, marker_value) + markers.append(marker_string) _pipfile['markers'] = ' and '.join(markers) return cls(**_pipfile) diff --git a/tests/test_pipenv.py b/tests/test_pipenv.py index 0e34bf70..8fc18f64 100644 --- a/tests/test_pipenv.py +++ b/tests/test_pipenv.py @@ -1107,7 +1107,7 @@ requests = "==2.14.0" # Not sure where travis/appveyor run tests from test_dir = os.path.dirname(os.path.abspath(__file__)) source_path = os.path.abspath(os.path.join(test_dir, 'test_artifacts', file_name)) - with PipenvInstance() as p: + with PipenvInstance(chdir=True) as p: # This tests for a bug when installing a zipfile in the current dir copy_to = os.path.join(p.path, file_name) shutil.copy(source_path, copy_to)