Mercurial > repos > guerler > springsuite
comparison planemo/lib/python3.7/site-packages/pip/_internal/distributions/base.py @ 1:56ad4e20f292 draft
"planemo upload commit 6eee67778febed82ddd413c3ca40b3183a3898f1"
author | guerler |
---|---|
date | Fri, 31 Jul 2020 00:32:28 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:d30785e31577 | 1:56ad4e20f292 |
---|---|
1 import abc | |
2 | |
3 from pip._vendor.six import add_metaclass | |
4 | |
5 | |
6 @add_metaclass(abc.ABCMeta) | |
7 class AbstractDistribution(object): | |
8 """A base class for handling installable artifacts. | |
9 | |
10 The requirements for anything installable are as follows: | |
11 | |
12 - we must be able to determine the requirement name | |
13 (or we can't correctly handle the non-upgrade case). | |
14 | |
15 - for packages with setup requirements, we must also be able | |
16 to determine their requirements without installing additional | |
17 packages (for the same reason as run-time dependencies) | |
18 | |
19 - we must be able to create a Distribution object exposing the | |
20 above metadata. | |
21 """ | |
22 | |
23 def __init__(self, req): | |
24 super(AbstractDistribution, self).__init__() | |
25 self.req = req | |
26 | |
27 @abc.abstractmethod | |
28 def get_pkg_resources_distribution(self): | |
29 raise NotImplementedError() | |
30 | |
31 @abc.abstractmethod | |
32 def prepare_distribution_metadata(self, finder, build_isolation): | |
33 raise NotImplementedError() |