make check work with --system more

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2018-02-13 14:10:38 -05:00
parent 94b20eb3f5
commit 1fd21857e1
+6 -1
View File
@@ -2063,8 +2063,13 @@ def do_check(three=None, python=False, system=False, unused=False, style=False,
crayons.normal(u'Checking PEP 508 requirements…', bold=True)
)
if system:
python = system_which('python')
else:
python = which('python')
# Run the PEP 508 checker in the virtualenv.
c = delegator.run('"{0}" {1}'.format(which('python'), shellquote(pep508checker.__file__.rstrip('cdo'))))
c = delegator.run('"{0}" {1}'.format(python, shellquote(pep508checker.__file__.rstrip('cdo'))))
results = simplejson.loads(c.out)
# Load the pipfile.