Skip to content

Commit

Permalink
remove package; is a future reserved word https://developer.mozilla.o…
Browse files Browse the repository at this point in the history
  • Loading branch information
trentfridey authored Feb 5, 2024
1 parent 7f0f51a commit 164bebb
Showing 1 changed file with 5 additions and 7 deletions.
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

0 comments on commit 164bebb

Please sign in to comment.