Skip to content

Commit 158940e

Browse files
committed
Switch to poetry
1 parent 9d36c7c commit 158940e

5 files changed

Lines changed: 164 additions & 41 deletions

File tree

.github/workflows/test-and-lint.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ jobs:
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020
cache: pip
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install -r requirements.txt
21+
cache-dependency-path: "**/poetry.lock"
22+
- name: Install poetry
23+
run: pip --disable-pip-version-check install -U poetry
24+
- name: Install Python dependencies
25+
run: poetry install
2526
- name: Type checking with mypy
2627
run: |
27-
mypy --version
28-
mypy htmlgen test_htmlgen
28+
poetry run mypy --version
29+
poetry run mypy htmlgen test_htmlgen
2930
- name: Test with unittest
30-
run: python -Wall -m unittest discover -t . -s test_htmlgen -p "*.py"
31+
run: poetry run python -Wall -m unittest discover -t . -s test_htmlgen -p "*.py"

poetry.lock

Lines changed: 127 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,31 @@
1+
[tool.poetry]
2+
name = "htmlgen"
3+
version = "3.0.0"
4+
description = "HTML 5 Generator"
5+
readme = "README.md"
6+
authors = ["Sebastian Rittau <srittau@rittau.biz>"]
7+
license = "MIT"
8+
homepage = "https://github.com/srittau/python-htmlgen"
9+
repository = "https://github.com/srittau/python-htmlgen"
10+
classifiers = [
11+
"Development Status :: 5 - Production/Stable",
12+
"Intended Audience :: Developers",
13+
"Topic :: Internet :: WWW/HTTP :: WSGI",
14+
"Topic :: Text Processing :: Markup :: HTML",
15+
]
16+
packages = [{ include = "htmlgen" }, { include = "test_htmlgen" }]
17+
include = ["*/py.typed", "*.pyi"]
18+
19+
[tool.poetry.dependencies]
20+
python = ">=3.7"
21+
22+
[tool.poetry.dev-dependencies]
23+
asserts = ">=0.8.0, <0.12"
24+
mypy = "0.931"
25+
126
[tool.black]
227
line-length = 79
28+
29+
[build-system]
30+
requires = ["poetry-core>=1.0.0"]
31+
build-backend = "poetry.core.masonry.api"

requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)