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
…23)

* pdm-build-locked command: ignore dependency-groups during resolution

* update python

fix keysview update

* set not dict

* update assert
  • Loading branch information
sigma67 authored Nov 22, 2024
1 parent f81faa7 commit 43fef67
Show file tree
Hide file tree
Showing 21 changed files with 576 additions and 565 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- uses: pdm-project/setup-pdm@v4
name: Install PDM
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docsbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
version: 0.5.4
version: 0.8.0
- uses: chartboost/ruff-action@v1
with:
version: 0.5.4
version: 0.8.0
args: format --check
mypy:
runs-on: ubuntu-latest
Expand Down
95 changes: 38 additions & 57 deletions pdm.lock

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

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
authors = [
{name = "sigma67", email = "sigma67.github@gmail.com"},
Expand All @@ -26,7 +26,7 @@ authors = [
dependencies = [
"tomli; python_version < \"3.11\""
]
requires-python = ">=3.8"
requires-python = ">=3.9"

[project.entry-points.pdm]
build-locked = "pdm_build_locked.plugin:main"
Expand All @@ -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
5 changes: 4 additions & 1 deletion src/pdm_build_locked/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@ def handle(self, project: Project, options: argparse.Namespace) -> None:
return

# we are not interested in the pdm dev-dependencies group
pdm_dev_dependencies = []
pdm_dev_dependencies = set()
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 |= 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
7 changes: 5 additions & 2 deletions tests/data/empty/pdm.lock

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

Loading

0 comments on commit 43fef67

Please sign in to comment.