forked from useblocks/sphinx-simplepdf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
207 lines (184 loc) · 4.78 KB
/
pyproject.toml
File metadata and controls
207 lines (184 loc) · 4.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "sphinx-simplepdf"
version = "1.7.0"
description = "An easy to use PDF Builder for Sphinx with a modern PDF-Theme."
readme = "README.rst"
license = { text = "MIT" }
requires-python = ">=3.10"
authors = [{ name = "team useblocks", email = "info@useblocks.com" }]
classifiers = [
"Framework :: Sphinx",
"Framework :: Sphinx :: Extension",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
"Topic :: Documentation",
"Topic :: Software Development :: Documentation",
]
dependencies = [
"pre-commit>=3.5",
"sphinx>=7.0",
"weasyprint==67.0",
"libsass",
"beautifulsoup4",
"packaging>=20.0", # Modern replacement for pkg_resources.parse_version
"pytest>=7.0",
]
[project.urls]
Homepage = "https://sphinx-simplepdf.readthedocs.io"
Repository = "https://github.com/useblocks/sphinx-simplepdf"
Documentation = "https://sphinx-simplepdf.readthedocs.io"
[project.entry-points."sphinx.html_themes"]
simplepdf_theme = "sphinx_simplepdf.themes.simplepdf_theme"
[project.entry-points."sphinx.builders"]
simplepdf = "sphinx_simplepdf.builders.simplepdf"
# [project.optional-dependencies]
[dependency-groups]
dev = [
"pytest>=7.0",
"pytest-xdist>=3.0",
"pytest-cov",
"tox>=4.0",
"tox-uv>=1.0",
"ruff>=0.4.0",
"pdfminer.six>=20220319",
"PyMuPDF>=1.24.0", # PDF -> Image for comparison
"opencv-python>=4.8.0", # cv2 for image processing
"scikit-image>=0.22.0", # ssim from skimage.metrics
]
docs = [
"sphinx>=7.0,<8.2",
"sphinxcontrib-plantuml",
"sphinx-needs",
"sphinx-copybutton",
"sphinx-design",
"sphinx-immaterial",
]
demo = [
"sphinx>=7.0,<8.2",
"sphinxcontrib-plantuml",
"sphinx-needs",
"sphinx-copybutton",
]
[tool.flit.module]
name = "sphinx_simplepdf"
[tool.flit.sdist]
include = [
"AUTHORS.rst",
"README.rst",
"sphinx_simplepdf/themes/simplepdf_theme/theme.conf",
"sphinx_simplepdf/themes/simplepdf_theme/*.html",
"sphinx_simplepdf/themes/simplepdf_theme/static/",
]
exclude = ["**/__pycache__", "**/*.py[co]"]
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"F", # pyflakes (includes unused imports)
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"UP", # pyupgrade
]
extend-ignore = ["B904", "ISC001", "ICN001", "N818", "RUF012"]
[tool.ruff.lint.isort]
known-first-party = ["sphinx_simplepdf"]
force-sort-within-sections = true
[tool.tox]
# To use tox, see https://tox.readthedocs.io
# $ pipx install tox
# it is suggested to use with https://github.com/tox-dev/tox-uv or https://github.com/tox-dev/tox-conda
# $ pipx inject tox tox-uv
legacy_tox_ini = """
[tox]
env_list =
lint
py{311,312,313}-sphinx{74,81} #82 not working, see https://github.com/sphinx-doc/sphinx/pull/13739
requires =
tox>=4
tox-uv>=1.0
[testenv]
deps =
sphinx>=7.0,<8.2
pytest
pdfminer.six>=20220319
sphinx-simplepdf @ .
commands =
pytest {posargs:tests/}
[testenv:py{310,311,312,313}-sphinx74]
deps =
sphinx>=7.4,<7.5
pytest
pdfminer.six>=20220319
PyMuPDF>=1.24.0
opencv-python>=4.8.0
scikit-image>=0.22.0
sphinx-simplepdf @ .
commands =
pytest {posargs:tests/}
[testenv:py{311,312,313}-sphinx81]
deps =
sphinx>=8.1,<8.2
pytest
pdfminer.six>=20220319
PyMuPDF>=1.24.0
opencv-python>=4.8.0
scikit-image>=0.22.0
sphinx-simplepdf @ .
commands =
pytest {posargs:tests/}
[testenv:py{311,312,313}-sphinx82]
deps =
sphinx>=8.2,<8.3
pytest
pdfminer.six>=20220319
PyMuPDF>=1.24.0
opencv-python>=4.8.0
scikit-image>=0.22.0
sphinx-simplepdf @ .
commands =
pytest {posargs:tests/}
[testenv:lint]
description = Run code quality checks
allowlist_externals =
ruff
deps =
ruff>=0.4.0
commands =
ruff check sphinx_simplepdf/
ruff format --check sphinx_simplepdf/
"""
# [tool.setuptools.packages.find]
# where = ["sphinx_simplepdf/themes/simplepdf_theme"]
# [tool.setuptools.package-data]
# sphinx_simplepdf=[
# 'theme.conf',
# '*.html',
# 'static/styles/*.css',
# 'static/js/*.js',
# 'static/fonts/*.*'
# ]
[tool.mypy]
python_version = "3.12"
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
strict_equality = true
extra_checks = true
no_implicit_reexport = true
exclude = ["^docs/", "^demo/", "^\\.venv/"]