2from typing
import Iterable, Set, Tuple
15 """Represents a source distribution.
17 The preparation step for these needs metadata for the packages to be
18 generated, either using PEP 517 or using the legacy `setup.py egg_info`.
21 def get_metadata_distribution(self) -> BaseDistribution:
22 return self.
reqreq.get_dist()
26 finder: PackageFinder,
27 build_isolation: bool,
28 check_build_deps: bool,
31 self.
reqreq.load_pyproject_toml()
34 should_isolate = self.
reqreq.use_pep517
and build_isolation
46 self.
reqreq.isolated_editable_sanity_check()
50 should_check_deps = self.
reqreq.use_pep517
and check_build_deps
52 pyproject_requires = self.
reqreq.pyproject_requires
53 assert pyproject_requires
is not None
61 self.
reqreq.prepare_metadata()
66 pyproject_requires = self.
reqreq.pyproject_requires
67 assert pyproject_requires
is not None
71 finder, pyproject_requires,
"overlay", kind=
"build dependencies"
74 self.
reqreq.requirements_to_check
80 "Missing build requirements in pyproject.toml for %s.",
84 "The project does not specify a build backend, and "
85 "pip cannot fall back to setuptools without %s.",
86 " and ".join(map(repr, sorted(missing))),
90 with self.
reqreq.build_env:
91 runner = runner_with_spinner_message(
"Getting requirements to build wheel")
92 backend = self.
reqreq.pep517_backend
93 assert backend
is not None
98 with self.
reqreq.build_env:
99 runner = runner_with_spinner_message(
100 "Getting requirements to build editable"
102 backend = self.
reqreq.pep517_backend
103 assert backend
is not None
113 and self.
reqreq.permit_editable_wheels
114 and self.
reqreq.supports_pyproject_editable()
123 finder, missing,
"normal", kind=
"backend dependencies"
127 self, conflicting_with: str, conflicting_reqs: Set[Tuple[str, str]]
130 "Some build dependencies for {requirement} "
131 "conflict with {conflicting_with}: {description}."
135 conflicting_with=conflicting_with,
136 description=
", ".join(
137 f
"{installed} is incompatible with {wanted}"
138 for installed, wanted
in sorted(conflicting_reqs)
145 "Some build dependencies for {requirement} are missing: {missing}."
148 requirement=self.
reqreq, missing=
", ".join(map(repr, sorted(missing)))
Iterable[str] _get_build_requires_wheel(self)
None _install_build_reqs(self, PackageFinder finder)
None _raise_missing_reqs(self, Set[str] missing)
Iterable[str] _get_build_requires_editable(self)
None _raise_conflicts(self, str conflicting_with, Set[Tuple[str, str]] conflicting_reqs)
None prepare_distribution_metadata(self, PackageFinder finder, bool build_isolation, bool check_build_deps)
None _prepare_build_backend(self, PackageFinder finder)