Skip to content

Fix: Allow pywrangler sync to build path-based dependencies - #269

Open
hoodmane wants to merge 2 commits into
cloudflare:mainfrom
hoodmane:hoodmane/build-local-paths
Open

hoodmane wants to merge 2 commits into
cloudflare:mainfrom
hoodmane:hoodmane/build-local-paths

Conversation

@hoodmane

Copy link
Copy Markdown
Contributor

We added --allow-build but this is broken because if version 1.0 of pkg-a is
available from pyodide-index but version 1.1 is on pypyi and 1.1 has no
emscripten wheel, with --allow-build will try and fail to build 1.1 from pypi
rather than installing 1.0 from the pyodide index.

This just takes note of which packages are local paths and allows building
exactly those.

We added --allow-build but this is broken because if version 1.0 of pkg-a is
available from pyodide-index but version 1.1 is on pypyi and 1.1 has no
emscripten wheel, with --allow-build will try and fail to build 1.1 from pypi
rather than installing 1.0 from the pyodide index.

This just takes note of which packages are local paths and allows building
exactly those.
@hoodmane
hoodmane force-pushed the hoodmane/build-local-paths branch from f14ae80 to d2add47 Compare September 18, 2026 20:21

@ryanking13 ryanking13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice!

default=None,
help=(
"Allow building source distributions and local directory sources. "
"Allow building any source distribution, not just local path sources. "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not just local path sources. part looks unnecessary, and sound like AI.

testlib = { path = "../testlib/dist/testlib-0.0.0-py3-none-any.whl" }
django-cf = { path = "../packages/django-cf" }
testlib = { path = "../packages/testlib" }
workers-runtime-sdk = { path = "../packages/runtime-sdk" }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice to see that this works now!

Comment on lines +84 to +85
# These are deployable example apps, so their pyproject.toml depends on the
# released django-cf from PyPI. Tests must exercise the working tree instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, we should split the templates and the unittests.

Comment on lines +136 to +139
Unlike the app fixtures above, the worker's pyproject.toml depends on the
working-tree django-cf, runtime-sdk and testlib via ``../packages/...``
path sources, which the ``packages`` symlink makes resolvable, so ``sync``
vendors them directly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This comment now looks unnecessary.

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