Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of reserved word "package" as variable name #50

Merged
merged 2 commits into from
Feb 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions include/pyjs/pre_js/load_pkg.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ async function bootstrap_python(prefix, package_tarballs_root_url, python_packag
}




Module["bootstrap_from_empack_packed_environment"] = async function
(
packages_json_url,
Expand Down Expand Up @@ -129,12 +127,12 @@ Module["bootstrap_from_empack_packed_environment"] = async function
(
package_tarballs_root_url,
python_is_ready_promise,
package
pkg
) {
let package_url = `${package_tarballs_root_url}/${package.filename}`
console.log(`fetching pkg ${package.name} from ${package_url}`)
let package_url = `${package_tarballs_root_url}/${pkg.filename}`
console.log(`fetching pkg ${pkg.name} from ${package_url}`)
let byte_array = await fetchByteArray(package_url)
const tarball_path = `/package_tarballs/${package.filename}`;
const tarball_path = `/package_tarballs/${pkg.filename}`;
Module.FS.writeFile(tarball_path, byte_array);
console.log(`extract ${tarball_path} (${byte_array.length} bytes)`)
await python_is_ready_promise;
Expand Down Expand Up @@ -162,7 +160,7 @@ Module["bootstrap_from_empack_packed_environment"] = async function
let python_is_ready_promise = bootstrap_python(prefix, package_tarballs_root_url, python_package);

// create array with size
let shared_libs = await Promise.all(packages.map(package => fetchAndUntar(package_tarballs_root_url, python_is_ready_promise, package)))
let shared_libs = await Promise.all(packages.map(pkg => fetchAndUntar(package_tarballs_root_url, python_is_ready_promise, pkg)))

if(!skip_loading_shared_libs){
// instantiate all packages
Expand Down
Loading