Skip to content

Commit 4ea0923

Browse files
committed
Add test
1 parent 762fd76 commit 4ea0923

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
### Added
10+
11+
- `micropip.install` now supports installing dependencies of wheels from custom download locations.
12+
13+
- `micropip.install` now supports extras in custom download locations through the `pkg[extras] @ https://example.com/pkg-1.0.0-py3-none-any.whl` syntax.
14+
15+
### Changed
16+
917
## [0.10.1] - 2025/07/05
1018

1119
### Fixed

tests/integration/test_integration.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,32 @@ async def _run(selenium):
183183
assert (dist_dir / "PYODIDE_SHA256").exists()
184184

185185
_run(selenium_standalone_micropip)
186+
187+
188+
@integration_test_only
189+
def test_install_url_based_wheel(selenium_standalone_micropip):
190+
# Dependencies of URL based wheels are fetched from PyPI. It is tricky to test this without accessing PyPI, hence integration test
191+
@run_in_pyodide
192+
async def run(selenium, url):
193+
import micropip
194+
195+
await micropip.install(f"typer @ {url}")
196+
197+
try:
198+
import rich
199+
except ModuleNotFoundError:
200+
pass
201+
else:
202+
raise Exception("Should raise!")
203+
204+
await micropip.uninstall("typer")
205+
206+
await micropip.install(f"typer[all] @ {url}")
207+
208+
import typer
209+
import rich
210+
211+
212+
# typer 0.10.0 has "[all]" dependency that comes with colorama, shellingham, and rich
213+
typer_0_10_0_url = "https://files.pythonhosted.org/packages/d9/07/8100c125307a26f03c305764f22cd995ae1878071ddf1df3588add73b53c/typer-0.10.0-py3-none-any.whl"
214+
_run(selenium_standalone_micropip, typer_0_10_0_url)

0 commit comments

Comments
 (0)