Skip to content

Commit

Permalink
pdm-build-locked command: ignore dependency-groups during resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed Nov 22, 2024
1 parent f81faa7 commit e3bbe8c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 35 deletions.
71 changes: 37 additions & 34 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ package-dir = "src"

[tool.pdm.dev-dependencies]
dev = [
"pdm[pytest]>=2.17.0",
"pdm[pytest]>=2.20.0",
"pytest>=7.4.0",
"pkginfo>=1.9.6",
"pytest-cov>=4.1.0",
Expand Down
3 changes: 3 additions & 0 deletions src/pdm_build_locked/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def handle(self, project: Project, options: argparse.Namespace) -> None:
if dev_dependencies := project.pyproject.settings.get("dev-dependencies"):
pdm_dev_dependencies = dev_dependencies.keys()

if dev_dependencies := getattr(project.pyproject, "dev_dependencies", None):
pdm_dev_dependencies.extend(dev_dependencies.keys())

groups = project.pyproject.settings.get("build", {}).get("locked-groups", None)
if groups is None:
groups = {group for group in project.all_dependencies if group not in pdm_dev_dependencies}
Expand Down

0 comments on commit e3bbe8c

Please sign in to comment.