Skip to content

Support --no-isolation flag from pypa/build for "unisolated" package builds #136

@agriyakhetarpal

Description

@agriyakhetarpal

This feature request is based on a requirement that came up in #109 – building a package without isolation would mean that:

  • users install PEP 508 build dependencies independently from a requirements file, an environment file, etc. prior to building the package, so that those dependencies are available
    • this is not easy to handle with pyodide-build and Pyodide's recipe format upstream, so we should probably not do this and keep installing the dependencies beforehand.
  • we don't create a PEP 517 isolated virtual environment for building if pyodide build --no-isolation
    • should we also have a boolean isolated: field for the recipes that want to opt in to this?

So, supporting this feature for us would be limited to point 2, similar to -n option, but we would deviate from pypa/build's behaviour and would actually be -nx (where -x stands for skipping build dependency checks – see https://build.pypa.io/en/stable/#python--m-build-options).

A package to be built without isolation would, therefore, go through this process:

  • we still install their build-time dependencies into the environment
  • at the time of building the package, we pass the equivalent args for the -nx flags to DefaultIsolatedEnv, or we monkeypatch IsolatedEnv to create a persistent venv for installation that we can reuse.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions