Skip to content
Open
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
9 changes: 9 additions & 0 deletions esm/interpreter/pyodide.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ export default {
progress('Loading remote packages');
config.packages = (packages = await _remote_package([config, baseURL], packages));
progress('Loaded remote packages');
// Detect local wheels: packages that are paths (./ ../ / emfs:// file://)
// or URLs ending in .whl. When local wheels are present, disable IndexedDB
// caching unless the user explicitly sets packages_cache = "all".
// See https://github.com/pyscript/pyscript/issues/2282
if (packages && packages.some(pkg => /^(?:\.{1,2}\/|\/|(?:emfs|file):\/\/)/.test(pkg) || /\.whl(?:\?|$)/.test(pkg))) {
if (config.packages_cache !== 'all') {
config.packages_cache = 'never';
}
}
}
progress('Loading Storage');
const indexURL = url.slice(0, url.lastIndexOf('/'));
Expand Down