Skip to content

Commit e315774

Browse files
committed
Use pdm for everything
1 parent ee2d46a commit e315774

File tree

4 files changed

+20
-219
lines changed

4 files changed

+20
-219
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ repos:
99
- id: trailing-whitespace
1010
- id: end-of-file-fixer
1111
- id: check-yaml
12+
- id: check-toml

action.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,27 @@ runs:
2626
update-environment: false
2727
cache: pip
2828

29+
- uses: pdm-project/setup-pdm@v3
30+
with:
31+
python-version: 3.x
32+
cache: true
33+
2934
- name: Create venv for tools
30-
run: ${{ steps.python-baipp.outputs.python-path }} -Im venv /tmp/baipp
3135
shell: bash
36+
run: |
37+
pwd
38+
ls -a
39+
pdm venv create --name baipp ${{ steps.python-baipp.outputs.python-path }}
40+
pdm venv list -v
3241
33-
- name: Install our tools
34-
run: >
35-
/tmp/baipp/bin/python
36-
-Im pip
37-
--disable-pip-version-check
38-
--no-python-version-warning
39-
install -r ${{ github.action_path }}/requirements/tools.txt
40-
shell: bash
42+
pdm sync --venv baipp
4143
4244
# Build SDist, then build wheel out of it.
4345
# Set 'SOURCE_DATE_EPOCH' based on the last commit for build
4446
# reproducibility.
4547
- run: >
4648
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
47-
/tmp/baipp/bin/python -m build --outdir /tmp/baipp/dist
49+
pdm run build --outdir /tmp/baipp/dist
4850
shell: bash
4951
working-directory: ${{ inputs.path }}
5052

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
[build-system]
2+
requires = ["pdm-pep517"]
3+
build-backend = "pdm.pep517.api"
4+
5+
[tool.pdm.scripts]
6+
build = "python -Im build"
7+
18
[project]
29
name = "build-and-inspect-python-package"
310
version = "0" # we're not an actual package.

requirements/tools.txt

Lines changed: 0 additions & 209 deletions
This file was deleted.

0 commit comments

Comments
 (0)