Skip to content

Commit

Permalink
Merge pull request #212 from hugovk/setuptools-to-hatch
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Oct 28, 2022
2 parents 1fb68dd + fabac93 commit c73b7e3
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 77 deletions.
3 changes: 3 additions & 0 deletions .flake8
@@ -0,0 +1,3 @@
[flake8]
extend-ignore = E203
max-line-length = 88
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Expand Up @@ -22,9 +22,9 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.x"
cache: pip
cache-dependency-path: "setup.py"
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: |
Expand All @@ -33,7 +33,6 @@ jobs:
- name: Build package
run: |
python setup.py --version
python -m build
twine check --strict dist/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.cfg
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: |
Expand Down
19 changes: 12 additions & 7 deletions .pre-commit-config.yaml
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.38.2
rev: v3.1.0
hooks:
- id: pyupgrade
args: [--py37-plus]

- repo: https://github.com/psf/black
rev: 22.8.0
rev: 22.10.0
hooks:
- id: black
args: [--target-version=py37]
Expand All @@ -32,21 +32,26 @@ repos:
rev: v4.3.0
hooks:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.0.0
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 0.3.5
hooks:
- id: setup-cfg-fmt
args: [--max-py-version=3.11, --include-version-classifiers]
- id: pyproject-fmt

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.10.1
hooks:
- id: validate-pyproject

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 0.5.2
hooks:
- id: tox-ini-fmt

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.0
rev: v3.0.0-alpha.4
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
Expand Down
57 changes: 57 additions & 0 deletions pyproject.toml
@@ -0,0 +1,57 @@
[build-system]
build-backend = "hatchling.build"
requires = [
"hatch-vcs",
"hatchling",
]

[project]
name = "prettytable"
description = "A simple Python library for easily displaying tabular data in a visually appealing ASCII table format"
readme = "README.md"
license = {text = "BSD (3 clause)"}
maintainers = [{name ="Jazzband"}]
authors = [{name = "Luke Maurits", email = "luke@maurits.id.au"}]
requires-python = ">=3.7"
dependencies = [
'importlib-metadata; python_version < "3.8"',
"wcwidth",
]
dynamic = [
"version",
]
classifiers = [
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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 :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Text Processing",
"Typing :: Typed",
]
[project.optional-dependencies]
tests = [
"pytest",
"pytest-cov",
"pytest-lazy-fixture",
]

[project.urls]
Homepage = "https://github.com/jazzband/prettytable"
Source = "https://github.com/jazzband/prettytable"


[tool.hatch]
version.source = "vcs"

[tool.hatch.version.raw-options]
local_scheme = "no-local-version"

[tool.isort]
profile = "black"
52 changes: 0 additions & 52 deletions setup.cfg

This file was deleted.

14 changes: 0 additions & 14 deletions setup.py

This file was deleted.

1 change: 1 addition & 0 deletions tox.ini
Expand Up @@ -2,6 +2,7 @@
envlist =
lint
py{py3, 311, 310, 39, 38, 37}
isolated_build = true

[testenv]
passenv =
Expand Down

0 comments on commit c73b7e3

Please sign in to comment.