Skip to content

Commit 6fbc43f

Browse files
authored
🔧 PEP 621 package build, drop Python 3.6 (#51)
1 parent e96d4e4 commit 6fbc43f

22 files changed

+96
-132
lines changed

‎.github/workflows/tests.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ jobs:
2828

2929
runs-on: ubuntu-latest
3030
strategy:
31+
fail-fast: false
3132
matrix:
32-
python-version: [pypy3, 3.6, 3.7, 3.8, 3.9]
33+
python-version: ['pypy-3.7', '3.7', '3.8', '3.9', '3.10']
3334

3435
steps:
3536
- uses: actions/checkout@v2
@@ -64,13 +65,13 @@ jobs:
6465
- name: Set up Python
6566
uses: actions/setup-python@v2
6667
with:
67-
python-version: 3.8
68-
- name: Build package
68+
python-version: "3.8"
69+
- name: install flit
6970
run: |
70-
pip install build
71-
python -m build
72-
- name: Publish
73-
uses: pypa/gh-action-pypi-publish@v1.1.0
74-
with:
75-
user: __token__
76-
password: ${{ secrets.PYPI_KEY }}
71+
pip install flit~=3.4
72+
- name: Build and publish
73+
run: |
74+
flit publish
75+
env:
76+
FLIT_USERNAME: __token__
77+
FLIT_PASSWORD: ${{ secrets.PYPI_KEY }}

‎.pre-commit-config.yaml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,13 @@ repos:
1919
- id: end-of-file-fixer
2020
- id: trailing-whitespace
2121

22-
- repo: https://github.com/mgedmin/check-manifest
23-
rev: "0.48"
24-
hooks:
25-
- id: check-manifest
26-
args: [--no-build-isolation]
27-
additional_dependencies: [setuptools>=46.4.0]
28-
29-
# this is not used for now,
30-
# since it converts mdit-py-plugins to mdit_py_plugins and removes comments
31-
# - repo: https://github.com/asottile/setup-cfg-fmt
32-
# rev: v1.17.0
33-
# hooks:
34-
# - id: setup-cfg-fmt
35-
3622
- repo: https://github.com/timothycrosley/isort
3723
rev: 5.10.1
3824
hooks:
3925
- id: isort
4026

4127
- repo: https://github.com/psf/black
42-
rev: 22.6.0
28+
rev: 22.8.0
4329
hooks:
4430
- id: black
4531

@@ -50,7 +36,7 @@ repos:
5036
additional_dependencies: [flake8-bugbear==21.3.1]
5137

5238
- repo: https://github.com/pre-commit/mirrors-mypy
53-
rev: v0.961
39+
rev: v0.971
5440
hooks:
5541
- id: mypy
56-
additional_dependencies: [markdown-it-py~=1.0]
42+
additional_dependencies: [markdown-it-py~=2.0]

‎MANIFEST.in

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

‎pyproject.toml

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,67 @@
11
[build-system]
2-
requires = ["setuptools>=46.4.0", "wheel"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["flit_core >=3.4,<4"]
3+
build-backend = "flit_core.buildapi"
4+
5+
[project]
6+
name = "mdit-py-plugins"
7+
dynamic = ["version"]
8+
description = "Collection of plugins for markdown-it-py"
9+
readme = "README.md"
10+
authors = [{name = "Chris Sewell", email = "chrisj_sewell@hotmail.com"}]
11+
license = {file = "LICENSE"}
12+
classifiers = [
13+
"Development Status :: 5 - Production/Stable",
14+
"Intended Audience :: Developers",
15+
"License :: OSI Approved :: MIT License",
16+
"Programming Language :: Python :: 3",
17+
"Programming Language :: Python :: 3.7",
18+
"Programming Language :: Python :: 3.8",
19+
"Programming Language :: Python :: 3.9",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: Implementation :: CPython",
22+
"Programming Language :: Python :: Implementation :: PyPy",
23+
"Topic :: Software Development :: Libraries :: Python Modules",
24+
"Topic :: Text Processing :: Markup",
25+
]
26+
keywords = ["markdown", "markdown-it", "lexer", "parser", "development"]
27+
requires-python = ">=3.7"
28+
dependencies = ["markdown-it-py>=1.0.0,<3.0.0"]
29+
30+
[project.urls]
31+
Homepage = "https://github.com/executablebooks/mdit-py-plugins"
32+
Documentation = "https://markdown-it-py.readthedocs.io"
33+
34+
[project.optional-dependencies]
35+
code_style = ["pre-commit"]
36+
testing = [
37+
"coverage",
38+
"pytest",
39+
"pytest-cov",
40+
"pytest-regressions",
41+
]
42+
rtd = [
43+
"attrs",
44+
"myst-parser~=0.16.1",
45+
"sphinx-book-theme~=0.1.0",
46+
]
47+
48+
[tool.flit.module]
49+
name = "mdit_py_plugins"
50+
51+
[tool.flit.sdist]
52+
exclude = [
53+
"docs/",
54+
"tests/",
55+
]
456

557
[tool.isort]
658
profile = "black"
59+
force_sort_within_sections = true
760
known_first_party = ["mdit_py_plugins", "tests"]
61+
62+
[tool.mypy]
63+
show_error_codes = true
64+
warn_unused_ignores = true
65+
warn_redundant_casts = true
66+
no_implicit_optional = true
67+
strict_equality = true

‎setup.cfg

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

‎setup.py

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

‎tests/test_amsmath.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from pathlib import Path
22
from textwrap import dedent
33

4-
import pytest
54
from markdown_it import MarkdownIt
65
from markdown_it.utils import read_fixture_file
6+
import pytest
77

88
from mdit_py_plugins.amsmath import amsmath_plugin
99

‎tests/test_anchors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from pathlib import Path
22

3-
import pytest
43
from markdown_it import MarkdownIt
54
from markdown_it.utils import read_fixture_file
5+
import pytest
66

77
from mdit_py_plugins.anchors import anchors_plugin
88

‎tests/test_colon_fence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from pathlib import Path
22
from textwrap import dedent
33

4-
import pytest
54
from markdown_it import MarkdownIt
65
from markdown_it.utils import read_fixture_file
6+
import pytest
77

88
from mdit_py_plugins.colon_fence import colon_fence_plugin
99

‎tests/test_container.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from pathlib import Path
22
from textwrap import dedent
33

4-
import pytest
54
from markdown_it import MarkdownIt
65
from markdown_it.utils import read_fixture_file
6+
import pytest
77

88
from mdit_py_plugins.container import container_plugin
99

0 commit comments

Comments
 (0)