@@ -102,26 +102,26 @@ class BaseStarlarkManifestHandler(models.DatafileHandler):
102102 def assemble (cls , package_data , resource , codebase , package_adder ):
103103 """
104104 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.
107107 """
108- datafile_path = resource .path
109108 # do we have enough to create a package?
110109 if package_data .purl :
111110 package = models .Package .from_package_data (
112111 package_data = package_data ,
113- datafile_path = datafile_path ,
112+ datafile_path = resource . path ,
114113 )
115114
116115 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 ()} " )
118117
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
125125
126126 cls .assign_package_to_resources (
127127 package = package ,
0 commit comments