Skip to content

Commit 9b86af5

Browse files
committed
Download Python packages from r2
1 parent 4a7a063 commit 9b86af5

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/pyodide/internal/loadPackage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function getPackageMetadata(requirement: string): PackageDeclaration {
3939

4040
function loadBundleFromArtifactBundler(requirement: string): Reader {
4141
const filename = getPackageMetadata(requirement).file_name;
42-
const fullPath = `python-package-bucket/${PACKAGES_VERSION}/${filename}`;
42+
const fullPath = `${PACKAGES_VERSION}/${filename}`;
4343
const reader = ArtifactBundler.getPackage(fullPath);
4444
if (!reader) {
4545
throw new PythonWorkersInternalError(

src/workerd/api/pyodide/pyodide.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ WD_STRONG_BOOL(IsValidating);
3030
WD_STRONG_BOOL(IsWorkerd);
3131
WD_STRONG_BOOL(SnapshotToDisk);
3232

33-
const auto PYTHON_PACKAGES_URL =
34-
"https://storage.googleapis.com/cloudflare-edgeworker-python-packages/";
33+
const auto PYTHON_PACKAGES_URL = "https://python-packages.edgeworker.net/";
3534
class PyodideBundleManager {
3635
public:
3736
void setPyodideBundleData(kj::String version, kj::Array<unsigned char> data) const;

src/workerd/server/pyodide.c++

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ kj::Promise<void> loadPyodidePackage(const api::pyodide::PythonConfig& pyConfig,
144144
kj::Network& network,
145145
kj::Timer& timer) {
146146

147-
auto path = kj::str("python-package-bucket/", packagesVersion, "/", filename);
147+
auto path = kj::str(packagesVersion, "/", filename);
148148
// First check if we already have this package in memory
149149
if (pyodidePackageManager.getPyodidePackage(path) != kj::none) {
150150
co_return;

0 commit comments

Comments
 (0)