Skip to content

Commit

Permalink
migrate to pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
zweckj committed Nov 19, 2024
1 parent 74b35fb commit 3b2a753
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 48 deletions.
44 changes: 28 additions & 16 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
on:
workflow_dispatch:
push:
branches:
- 'main'
- 'releases/**'
paths:
- 'setup.py'
release:
types:
- published

env:
DEFAULT_PYTHON: "3.12"

jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
id-token: write
contents: write
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4

- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
with:
python-version: "3.x"
python-version: ${{ env.DEFAULT_PYTHON }}

- name: Build source and wheel distributions
- name: Set up uv
run: pipx install uv

- name: Install dependencies
run: |
python -m pip install --upgrade build twine
python -m build
twine check --strict dist/*
uv pip install --system -r pyproject.toml --extra dev
- name: Build package
run: uv build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

- name: ✍️ Sign published artifacts
uses: sigstore/[email protected]
with:
inputs: ./dist/*.tar.gz ./dist/*.whl
release-signing-artifacts: true
37 changes: 37 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[project]
name = "aioacaia"
version = "0.1.8"
license = {text = "MIT License"}
description = "An async implementation of PyAcaia"
readme = "README.md"
authors = [{name = "Josef Zweck", email = "[email protected]"}]
maintainers = [{name = "Josef Zweck", email = "[email protected]"}]
keywords = ["Acaia", "Bluetooth", "api", "async", "client"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"bleak >= 0.20.2",
]
requires-python = "~= 3.12"

[project.urls]
Homepage = "https://github.com/zweckj/aioacaia"
Repository = "https://github.com/zweckj/aioacaia"
Documentation = "https://github.com/zweckj/aioacaia"

[project.optional-dependencies]
dev = [
"covdefaults == 2.3.0",
"coverage == 7.6.7",
"syrupy == 4.7.2",
"pytest == 8.3.3",
"pytest-asyncio == 0.24.0",
"pytest-cov == 6.0.0",
]
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

30 changes: 0 additions & 30 deletions setup.py

This file was deleted.

0 comments on commit 3b2a753

Please sign in to comment.