Skip to content

Commit

Permalink
use pdm-build-locked (#3001)
Browse files Browse the repository at this point in the history
* use pdm-build-locked

* add fragment & test

* use backend approach

* update release test

* use GH actions syntax

* undo build changes

* delete test workflow
  • Loading branch information
sigma67 authored Jul 9, 2024
1 parent 7b57377 commit ccac19b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Test Build
run: |
python -m pip install dist/*.whl
python -m pip install "pdm[locked] @ file://$(ls ${GITHUB_WORKSPACE}/dist/*.whl)"
pdm --help
- name: Publish package distributions to PyPI
Expand Down
17 changes: 17 additions & 0 deletions news/3001.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
PDM is now published with optional pinned dependencies using the pdm plugin [pdm-build-locked](https://pdm-build-locked.readthedocs.io/).

To install pdm with its dependencies pinned to the versions it was tested with, run:

```bash

pipx install pdm[locked]
```

To install optional dependency group copier:

```bash

pipx install pdm[locked,copier-locked]
```

This feature is entirely optional. Installing pdm without the extra will work the same way as before this change.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["pdm-backend"]
requires = ["pdm-backend", "pdm-build-locked"]
build-backend = "pdm.backend"

[project]
Expand Down Expand Up @@ -85,6 +85,7 @@ includes = ["src/pdm"]
source-includes = ["tests", "typings", "CHANGELOG.md", "LICENSE", "README.md", "tox.ini"]
# editables backend doesn't work well with namespace packages
editable-backend = "path"
locked = true

[tool.pdm.scripts]
pre_release = "python tasks/max_versions.py"
Expand Down

0 comments on commit ccac19b

Please sign in to comment.