@@ -102,26 +102,26 @@ class BaseStarlarkManifestHandler(models.DatafileHandler):
102
102
def assemble (cls , package_data , resource , codebase , package_adder ):
103
103
"""
104
104
Given a ``package_data`` PackageData found in the ``resource`` datafile
105
- of the ``codebase``, assemble package their files and dependencies
106
- from one or more datafiles.
105
+ of the ``codebase``, assemble and yield a Package with its files and
106
+ dependencies from one or more datafiles.
107
107
"""
108
- datafile_path = resource .path
109
108
# do we have enough to create a package?
110
109
if package_data .purl :
111
110
package = models .Package .from_package_data (
112
111
package_data = package_data ,
113
- datafile_path = datafile_path ,
112
+ datafile_path = resource . path ,
114
113
)
115
114
116
115
if TRACE :
117
- logger_debug (f"build: assemble: package_data: { package_data .to_dict ()} " )
116
+ logger_debug (f"BaseStarlarkManifestHandler. assemble: package_data: { package_data .to_dict ()} " )
118
117
119
- package .license_detections , package .declared_license_expression = \
120
- get_license_detections_and_expression (
121
- package = package_data ,
122
- resource = resource ,
123
- codebase = codebase ,
124
- )
118
+ detections , expression = get_license_detections_and_expression (
119
+ package = package_data ,
120
+ resource = resource ,
121
+ codebase = codebase ,
122
+ )
123
+ package .license_detections = detections
124
+ package .declared_license_expression = expression
125
125
126
126
cls .assign_package_to_resources (
127
127
package = package ,
0 commit comments