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.
import pytest


@pytest.mark.driver_timeout(40)
def test_scikit_learn(selenium_standalone, request):
    selenium = selenium_standalone
    selenium.load_package("scikit-learn")
    assert (
        selenium.run(
            """
        import numpy as np
        import sklearn
        from sklearn.linear_model import LogisticRegression

        rng = np.random.RandomState(42)
        X = rng.rand(100, 20)
        y = rng.randint(5, size=100)

        estimator = LogisticRegression(solver='liblinear')
        estimator.fit(X, y)
        print(estimator.predict(X))
        estimator.score(X, y)
        """
        )
        > 0
    )

import pytest


@pytest.mark.driver_timeout(40)
def test_scikit_learn(selenium_standalone, request):
    selenium = selenium_standalone
    selenium.load_package("scikit-learn")
    assert (
        selenium.run(
            """
        import numpy as np
        import sklearn
        from sklearn.linear_model import LogisticRegression

        rng = np.random.RandomState(42)
        X = rng.rand(100, 20)
        y = rng.randint(5, size=100)

        estimator = LogisticRegression(solver='liblinear')
        estimator.fit(X, y)
        print(estimator.predict(X))
        estimator.score(X, y)
        """
        )
        > 0
    )
