Files
pipenv/pipenv/vendor/pythonfinder/models/__init__.py
T
Dan Ryan 21f48ac3e0 Update pythonfinder to 1.0.2
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-08-27 15:59:10 -04:00

34 lines
729 B
Python

# -*- coding=utf-8 -*-
from __future__ import absolute_import, print_function
import abc
import operator
from itertools import chain
import six
from ..utils import KNOWN_EXTS, unnest
from .path import SystemPath
from .python import PythonVersion
from .windows import WindowsFinder
@six.add_metaclass(abc.ABCMeta)
class BaseFinder(object):
def get_versions(self):
"""Return the available versions from the finder"""
raise NotImplementedError
@classmethod
def create(cls):
raise NotImplementedError
@property
def version_paths(self):
return self.versions.values()
@property
def expanded_paths(self):
return (p.paths.values() for p in self.version_paths)