Skip to content

Commit

Permalink
Use pdm for everything
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Jul 23, 2023
1 parent ee2d46a commit e315774
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 219 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
22 changes: 12 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,27 @@ runs:
update-environment: false
cache: pip

- uses: pdm-project/setup-pdm@v3
with:
python-version: 3.x
cache: true

- name: Create venv for tools
run: ${{ steps.python-baipp.outputs.python-path }} -Im venv /tmp/baipp
shell: bash
run: |
pwd
ls -a
pdm venv create --name baipp ${{ steps.python-baipp.outputs.python-path }}
pdm venv list -v
- name: Install our tools
run: >
/tmp/baipp/bin/python
-Im pip
--disable-pip-version-check
--no-python-version-warning
install -r ${{ github.action_path }}/requirements/tools.txt
shell: bash
pdm sync --venv baipp
# Build SDist, then build wheel out of it.
# Set 'SOURCE_DATE_EPOCH' based on the last commit for build
# reproducibility.
- run: >
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
/tmp/baipp/bin/python -m build --outdir /tmp/baipp/dist
pdm run build --outdir /tmp/baipp/dist
shell: bash
working-directory: ${{ inputs.path }}
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[build-system]
requires = ["pdm-pep517"]
build-backend = "pdm.pep517.api"

[tool.pdm.scripts]
build = "python -Im build"

[project]
name = "build-and-inspect-python-package"
version = "0" # we're not an actual package.
Expand Down
209 changes: 0 additions & 209 deletions requirements/tools.txt

This file was deleted.

0 comments on commit e315774

Please sign in to comment.