Skip to content

Commit

Permalink
Windows fix
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Ryan <dan@danryan.co>
  • Loading branch information
techalchemy committed Jul 16, 2018
1 parent 0e3af57 commit 9c68041
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions pipenv/vendor/pythonfinder/models/windows.py
Expand Up @@ -24,21 +24,13 @@ def find_all_python_versions(self, major=None, minor=None, patch=None, pre=None,
None, filter(lambda c: version_matcher(c), self.version_list)
)
version_sort = operator.attrgetter("version_sort")
for c in sorted(py_filter, key=version_sort, reverse=True):
yield c.comes_from
return [c.comes_from for c in sorted(py_filter, key=version_sort, reverse=True)]

def find_python_version(self, major=None, minor=None, patch=None, pre=None, dev=None):
# version_matcher = operator.methodcaller(
# "matches", major=major, minor=minor, patch=patch, pre=pre, dev=dev
# )
# py_filter = filter(
# None, filter(lambda c: version_matcher(c), self.version_list)
# )
# version_sort = operator.attrgetter("version_sort")
return next(
self.find_all_python_versions(
return next((
v for v in self.find_all_python_versions(
major=major, minor=minor, patch=patch, pre=pre, dev=dev
), None
)), None
)

@versions.default
Expand Down

0 comments on commit 9c68041

Please sign in to comment.