Skip to content

Commit

Permalink
add compatibility note to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed Jul 21, 2024
1 parent b5df45b commit f55fa7b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions doc/src/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ pdm-build-locked is a pdm plugin to enabling reproducible installs of Python CLI

It achieves this by adding the pinned packages from PDM's lockfile as additional optional dependency groups to the distribution metadata.

Compatible with ``pdm>=2.11``.


.. toctree::
:maxdepth: 2
Expand Down
2 changes: 1 addition & 1 deletion src/pdm_build_locked/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def _get_locked_packages(project: Project, group: str) -> list[str]:
supported_params = inspect.signature(resolve_candidates_from_lockfile).parameters
if "cross_platform" in supported_params:
# pdm 2.11.0+
requirements = list(project.get_dependencies(group).values())
requirements = list(project.get_dependencies(group).values()) # type: ignore[attr-defined]
candidates = resolve_candidates_from_lockfile(project, requirements, cross_platform=True, groups=[group])
elif "env_spec" in supported_params:
# pdm 2.17.0+
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_build_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_build_locked_pyproject(pdm: PDMCallable, data_base_path: Path, temp_dir
assert result.exit_code == 0

wheel = wheel_from_tempdir(temp_dir)
assert count_group_dependencies(wheel, "locked") == 24
assert count_group_dependencies(wheel, "locked") == 26
assert count_group_dependencies(wheel, "extras-locked") == 1
assert count_group_dependencies(wheel, "cow-locked") == 1

Expand Down

0 comments on commit f55fa7b

Please sign in to comment.