Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hhhrrrttt222111
GitHub Repository: hhhrrrttt222111/Dorkify
Path: blob/master/venv/Lib/site-packages/pip/_internal/distributions/installed.py
811 views
1
from pip._internal.distributions.base import AbstractDistribution
2
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
3
4
if MYPY_CHECK_RUNNING:
5
from typing import Optional
6
7
from pip._vendor.pkg_resources import Distribution
8
from pip._internal.index.package_finder import PackageFinder
9
10
11
class InstalledDistribution(AbstractDistribution):
12
"""Represents an installed package.
13
14
This does not need any preparation as the required information has already
15
been computed.
16
"""
17
18
def get_pkg_resources_distribution(self):
19
# type: () -> Optional[Distribution]
20
return self.req.satisfied_by
21
22
def prepare_distribution_metadata(self, finder, build_isolation):
23
# type: (PackageFinder, bool) -> None
24
pass
25
26