Skip to content

Commit

Permalink
replace setup.py with pyproject.toml (#94)
Browse files Browse the repository at this point in the history
... switching from setuptools to hatchling along the way because the former didn't want to work.
  • Loading branch information
0xabu authored May 24, 2024
1 parent 53f2b4d commit 4459813
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 68 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
pip install build twine hatchling
- name: Extract version
id: get-version
run: echo "::set-output name=VERSION::$(python setup.py --version)"
run: echo "::set-output name=VERSION::$(python -m hatchling version)"
- name: Build package
run: python -m build
- name: Check package
Expand Down
16 changes: 0 additions & 16 deletions mypy.ini

This file was deleted.

52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "pdfannots"
dynamic = ["version"]
requires-python = ">=3.8"
dependencies = ["pdfminer.six >= 20220319"]
description = "Tool to extract and pretty-print PDF annotations for reviewing"
readme = "README.md"
license = {file = "LICENSE.txt"}
authors = [
{name = "Andrew Baumann", email = "[email protected]"},
]
classifiers = [
"Intended Audience :: Science/Research",
"Topic :: Text Processing",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"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",
]

[project.scripts]
pdfannots = "pdfannots.cli:main"

[project.urls]
Homepage = "https://github.com/0xabu/pdfannots"

[tool.hatch.version]
path = "pdfannots/__init__.py"

[tool.mypy]
# strict mode
warn_unused_configs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
no_implicit_reexport = true
strict_equality = true
50 changes: 0 additions & 50 deletions setup.py

This file was deleted.

0 comments on commit 4459813

Please sign in to comment.