micropip icon indicating copy to clipboard operation
micropip copied to clipboard

Add information about how to build, test, contribute to readme

Open hoodmane opened this issue 10 months ago • 4 comments

Readme has no info currently about building or testing micropip. It isn't completely obvious how to run the tests.

hoodmane avatar Feb 22 '25 13:02 hoodmane

I'm getting the following problem:

$ pip install -e micropip[tests]
$ pytest tests/ --rt node
ImportError while loading conftest '/home/rchatham/Documents/programming/micropip/tests/conftest.py'.
tests/conftest.py:17: in <module>
    from micropip._vendored.packaging.src.packaging.utils import parse_wheel_filename
micropip/__init__.py:1: in <module>
    from .package_manager import PackageManager
micropip/package_manager.py:11: in <module>
    from . import _mock_package, package_index
micropip/package_index.py:13: in <module>
    from ._utils import is_package_compatible, parse_version
micropip/_utils.py:8: in <module>
    from ._vendored.packaging.src.packaging.requirements import (
E   ModuleNotFoundError: No module named 'micropip._vendored.packaging.src'

hoodmane avatar Feb 22 '25 13:02 hoodmane

Yeah, I think we need to mention about

  • cloning with submodules
  • setting up pytest-pyodide to run test

ryanking13 avatar Feb 22 '25 14:02 ryanking13

Right, there should maybe be a script to setup the tests since we have to fetch pyodide and unpack it.

hoodmane avatar Feb 22 '25 14:02 hoodmane

It's very annoying that the CI uses: pyodide/pyodide-actions/download-pyodide@012fa537869d343726d01863a34b773fc4d96a14 so if I want to figure out what this does I have to go to another different repo

hoodmane avatar Feb 22 '25 14:02 hoodmane