Closes https://github.com/pyodide/pyodide/issues/604

This creates an installable `pyodide-build` Python package that we can also upload to PyPi under https://pypi.org/project/pyodide-build/ (currently uploaded the dev version to reserve the name).

There is also the identically named `pyodide-build` CLI command which replaces `bin/pyodide`.

The short term goals is to use fewer hacks with `PATH` and `PYTHONPATH`. Long term goal make it a user facing interface for building packages instead of the Makefile.
Create an installable pyodide-build package. Closes https://github.com/pyodide/pyodide/issues/604

This creates an installable `pyodide-build` Python package that we can also upload to PyPi under https://pypi.org/project/pyodide-build/ (currently uploaded the dev version to reserve the name).

There is also the identically named `pyodide-build` CLI command which replaces `bin/pyodide`.

The short term goals is to use fewer hacks with `PATH` and `PYTHONPATH`. Long term goal make it a user facing interface for building packages instead of the Makefile.
def test_pyodide_interrupts(selenium):
    selenium.load_package("pyodide-interrupts")
    selenium.run("from pyodide_interrupts import check_interrupts")
    assert (
        selenium.run(
            "x = 0\n"
            "def callback():\n"
            "    global x\n"
            "    print('check')\n"
            "    x += 1\n"
            "with check_interrupts(callback, 10):\n"
            "    for i in range(50):\n"
            "        print(i, end=',')\n"
            "x"
        )
        == 11
    )

def test_pyodide_interrupts(selenium):
    selenium.load_package("pyodide-interrupts")
    selenium.run("from pyodide_interrupts import check_interrupts")
    assert (
        selenium.run(
            "x = 0\n"
            "def callback():\n"
            "    global x\n"
            "    print('check')\n"
            "    x += 1\n"
            "with check_interrupts(callback, 10):\n"
            "    for i in range(50):\n"
            "        print(i, end=',')\n"
            "x"
        )
        == 11
    )
