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

Publish and install build dependencies to/from alternative package index #43

Open
ryanking13 opened this issue Oct 18, 2024 · 1 comment

Comments

@ryanking13
Copy link
Member

Proposal

I propose hosting multiple versions of packages used as a build dependency (== numpy) in an alternative package index, and let pyodide-build use it when installing build dependencies.

Why?

When building packages out-of-tree, each package may require a different version of Numpy. For now, if a package requires numpy as a build dependency, we just replace it with the numpy that is included in the Pyodide distribution, and hope it work.

For example, after we update the Numpy version in Pyodide distribution >= 2.0, some packages that use Numpy < 2.0 in the build step will fail to build because of the version mismatch.

How?

I've been publishing packages built in pyodide/pyodide-recipes to Anaconda package registry: Anaconda Pyodide org. For now, these packages cannot be installed in the Pyodide runtime (CORS issue), but we can still use it during build time.

pyodide-build will point to this package index when installing build dependencies.

Issues / Concerns

  • How should we handle the in-tree cases?
  • After unvendoring recipes, what should change?

Overview

As-is:

sequenceDiagram
    Note over pyodide-build: Start building a package
    PyPI->>pyodide-build: Install native build dependency
    xbuildenv->>pyodide-build: Replace cross-build files
    Note over pyodide-build: Continue building package
Loading

To-be:

sequenceDiagram
    Note over pyodide-build: Start building a package
    Pyodide Package Index->>pyodide-build: Install cross-compiled build dependency
    Note over pyodide-build: Continue building package
Loading
@hoodmane
Copy link
Member

hoodmane commented Oct 18, 2024

Nice diagrams. Sounds like a reasonable idea.

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

No branches or pull requests

2 participants