File tree 1 file changed +7
-4
lines changed
src/pip/_internal/distributions
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -24,24 +24,27 @@ def get_pkg_resources_distribution(self):
24
24
return self .req .get_dist ()
25
25
26
26
def prepare_distribution_metadata (self , finder , build_isolation ):
27
- # Prepare for building. We need to:
28
- # 1. Load pyproject.toml (if it exists)
29
- # 2. Set up the build environment
27
+ """Generate metadata for this distribution
28
+ """
30
29
assert self .req .source_dir
31
30
31
+ # Load pyproject.toml, to determine whether PEP 517 is to be used
32
32
self .req .load_pyproject_toml ()
33
+
34
+ # Set up the build isolation, if this requirement should be isolated
33
35
should_isolate = self .req .use_pep517 and build_isolation
34
36
if should_isolate :
35
37
self ._setup_isolation (finder )
36
38
39
+ # Generate metadata
37
40
with indent_log ():
38
41
self .req .metadata_directory = generate_metadata (self .req )
39
42
43
+ # Act on the newly generated metadata, based on the name and version.
40
44
if not self .req .name :
41
45
self .req .move_to_correct_build_directory ()
42
46
else :
43
47
self .req .warn_on_mismatching_name ()
44
-
45
48
self .req .assert_source_matches_version ()
46
49
47
50
def _setup_isolation (self , finder ):
You can’t perform that action at this time.
0 commit comments