Skip to content

Commit

Permalink
Merge pull request #3 from matthewfeickert/feat/update-to-hatchling
Browse files Browse the repository at this point in the history
feat: Use hatchling as the build backend
  • Loading branch information
gordonwatts authored Mar 29, 2024
2 parents 7e08851 + d2c91de commit 60884f9
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 64 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,33 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install --no-cache-dir -e .[test]
pip list
python -m pip install --upgrade '.[test]'
python -m pip list
- name: Lint with Flake8
if: matrix.python-version == 3.7 && matrix.os == 'ubuntu-latest'
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
run: |
flake8 --exclude=tests/* --ignore=E501,W503
- name: Test with pytest
run: |
python -m pytest
pytest
- name: Report coverage with Codecov
if: github.event_name == 'push' && matrix.python-version == 3.7 && matrix.os == 'ubuntu-latest'
if: github.event_name == 'push' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v1
65 changes: 65 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "make-it-sync"
version = "1.0.0"
description = "Create a sync version of an async function"
readme = "README.md"
requires-python = ">=3.7"
license = "MIT"
keywords = []
authors = [
{ name = "Gordon Watts", email = "[email protected]" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Topic :: Software Development",
"Topic :: Utilities",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"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 :: Implementation :: CPython",
]
dependencies = []

[project.urls]
Documentation = "https://github.com/gordonwatts/make-it-sync"
Homepage = "https://github.com/gordonwatts/make-it-sync"
Issues = "https://github.com/gordonwatts/make-it-sync/issues"
"Release Notes" = "https://github.com/gordonwatts/make-it-sync/releases"
"Releases" = "https://github.com/gordonwatts/make-it-sync/releases"
"Source Code" = "https://github.com/gordonwatts/make-it-sync"

[project.optional-dependencies]
test = [
"pytest>=3.9",
"pytest-asyncio",
"pytest-mock",
"pytest-cov",
"coverage",
"flake8",
"codecov",
"autopep8",
"build",
"twine",
"wheel",
]

[tool.hatch.build.targets.sdist]
# hatchling always includes:
# pyproject.toml, .gitignore, any README, any LICENSE, AUTHORS
include = [
"/make_it_sync/",
"/tests/"
]

[tool.hatch.build.targets.wheel]
packages = ["make_it_sync"]
55 changes: 0 additions & 55 deletions setup.py

This file was deleted.

0 comments on commit 60884f9

Please sign in to comment.