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

Allowing to use a package url #74

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AnastasiaSliusar
Copy link

This PR is the part of the solution of https://github.com/QuantStack/qs.ai/issues/28

This is updated version of #69 , but packages will be able to use a full url to be downloaded. It will be expected that empack_env_meta.json file will allow having url for packages and if it is present then this url will be used to download a certain package. If not, the default behavior will be taken.

This PR should be used together with jupyterlite/xeus#120

@@ -108,7 +108,7 @@ Module["bootstrap_from_empack_packed_environment"] = async function
pkg,
verbose
) {
let package_url = `${package_tarballs_root_url}/${pkg.filename}`
let package_url = pkg?.url ? pkg.url :`${package_tarballs_root_url}/${pkg.filename}`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let package_url = pkg?.url ? pkg.url :`${package_tarballs_root_url}/${pkg.filename}`
const package_url = pkg?.url ?? `${package_tarballs_root_url}/${pkg.filename}`

@@ -126,7 +126,7 @@ Module["bootstrap_from_empack_packed_environment"] = async function

async function bootstrap_python(prefix, package_tarballs_root_url, python_package, verbose) {
// fetch python package
let python_package_url = `${package_tarballs_root_url}/${python_package.filename}`
let python_package_url = python_package?.url ? python_package.url : `${package_tarballs_root_url}/${python_package.filename}`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let python_package_url = python_package?.url ? python_package.url : `${package_tarballs_root_url}/${python_package.filename}`
const python_package_url = python_package?.url ?? `${package_tarballs_root_url}/${python_package.filename}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants