@@ -117,7 +117,7 @@ def build_bundle_json(libs, bundle_version, output_filename, package_folder_pref
117
117
"""
118
118
Generate a JSON file of all the libraries in libs
119
119
"""
120
- packages = {}
120
+ packages = []
121
121
for library_path in libs :
122
122
package = {}
123
123
package_info = build .get_package_info (library_path , package_folder_prefix )
@@ -130,18 +130,19 @@ def build_bundle_json(libs, bundle_version, output_filename, package_folder_pref
130
130
package ["version" ] = package_info ["version" ]
131
131
package ["path" ] = "lib/" + package_info ["module_name" ]
132
132
package ["library_path" ] = library_path
133
- packages [ module_name ] = package
133
+ packages . append ( package )
134
134
135
135
library_submodules = {}
136
- for id in packages :
136
+ for package in packages :
137
137
library = {}
138
- library ["package" ] = packages [id ]["is_folder" ]
139
- library ["pypi_name" ] = packages [id ]["pypi_name" ]
140
- library ["version" ] = packages [id ]["version" ]
141
- library ["repo" ] = packages [id ]["repo" ]
142
- library ["path" ] = packages [id ]["path" ]
143
- library ["dependencies" ], library ["external_dependencies" ] = get_bundle_requirements (packages [id ]["library_path" ], packages )
144
- library_submodules [packages [id ]["module_name" ]] = library
138
+ library ["package" ] = package ["is_folder" ]
139
+ library ["pypi_name" ] = package ["pypi_name" ]
140
+ library ["version" ] = package ["version" ]
141
+ library ["repo" ] = package ["repo" ]
142
+ library ["path" ] = package ["path" ]
143
+ library ["dependencies" ], library ["external_dependencies" ] = get_bundle_requirements (package ["library_path" ], packages )
144
+ library_submodules [package ["module_name" ]] = library
145
+
145
146
out_file = open (output_filename , "w" )
146
147
json .dump (library_submodules , out_file , sort_keys = True )
147
148
out_file .close ()
0 commit comments