diff --git a/CHANGELOG.md b/CHANGELOG.md index 0db4b22..3748109 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Made micropip.freeze correctly list dependencies of manually installed packages. + [#79](https://github.com/pyodide/micropip/pull/79) + ## [0.4.0] - 2023/07/25 ### Added diff --git a/micropip/_utils.py b/micropip/_utils.py index b42a751..ea89987 100644 --- a/micropip/_utils.py +++ b/micropip/_utils.py @@ -187,7 +187,7 @@ def platform_to_version(platform: str) -> str: raise ValueError(f"Wheel interpreter version '{tag.interpreter}' is not supported.") -def fix_package_dependencies(package_name, *, extras=None): +def fix_package_dependencies(package_name: str, *, extras: list[str] = None) -> None: """Check and fix the list of dependencies for this package If you have manually installed a package and dependencies from wheels, @@ -234,7 +234,7 @@ def fix_package_dependencies(package_name, *, extras=None): if extras is None: extras = [None] else: - extras.append(None) + extras = extras + [None] for r in package_requires: req = Requirement(r) req_extras = req.extras