forked from comictagger/comictagger
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.cfg
348 lines (325 loc) · 8.17 KB
/
setup.cfg
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
[metadata]
name = comictagger
description = A cross-platform GUI/CLI app for writing metadata to comic archives
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/comictagger/comictagger
author = ComicTagger team
author_email = [email protected]
license = Apache-2.0
license_files = LICENSE
classifiers =
Development Status :: 4 - Beta
Environment :: Console
Environment :: MacOS X
Environment :: Win32 (MS Windows)
Environment :: X11 Applications :: Qt
Intended Audience :: End Users/Desktop
License :: OSI Approved :: Apache Software License
Natural Language :: English
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Topic :: Multimedia :: Graphics
Topic :: Other/Nonlisted Topic
Topic :: Utilities
keywords =
comictagger
comics
comic
metadata
tagging
tagger
[options]
packages = find:
install_requires =
appdirs==1.4.4
beautifulsoup4>=4.1
chardet>=5.1.0,<6
comicfn2dict>=0.2.1
importlib-metadata>=3.3.0
isocodes>=2023.11.26
natsort>=8.1.0
packaging>=20
pathvalidate
pillow>=9.1.0,<10
pyrate-limiter>=2.6,<3
pyyaml
rapidfuzz>=2.12.0
requests==2.*
settngs==0.10.4
text2digits
typing-extensions>=4.3.0
wordninja
python_requires = >=3.9
[options.packages.find]
exclude = tests; testing
[options.entry_points]
console_scripts = comictagger=comictaggerlib.main:main
comicapi.archiver =
zip = comicapi.archivers.zip:ZipArchiver
sevenzip = comicapi.archivers.sevenzip:SevenZipArchiver
rar = comicapi.archivers.rar:RarArchiver
folder = comicapi.archivers.folder:FolderArchiver
comicapi.tags =
cr = comicapi.tags.comicrack:ComicRack
comictagger.talker =
comicvine = comictalker.talkers.comicvine:ComicVineTalker
pyinstaller40 =
hook-dirs = comictaggerlib.__pyinstaller:get_hook_dirs
[options.extras_require]
7z =
py7zr
all =
PyQt5
PyQtWebEngine
comicinfoxml==0.4.*
gcd-talker>0.1.0
metron-talker>0.1.5
pillow-avif-plugin>=1.4.1
pillow-jxl-plugin>=1.2.5
py7zr
rarfile>=4.0
pyicu;sys_platform == 'linux' or sys_platform == 'darwin'
archived_tags =
ct-archived-tags
avif =
pillow-avif-plugin>=1.4.1
cbr =
rarfile>=4.0
cix =
comicinfoxml==0.4.*
gcd =
gcd-talker>0.1.0
gui =
PyQt5
icu =
pyicu;sys_platform == 'linux' or sys_platform == 'darwin'
jxl =
pillow-jxl-plugin>=1.2.5
metron =
metron-talker>0.1.5
pyinstaller =
PyQt5
PyQtWebEngine
comicinfoxml==0.4.*
pillow-avif-plugin>=1.4.1
pillow-jxl-plugin>=1.2.5
py7zr
rarfile>=4.0
pyicu;sys_platform == 'linux' or sys_platform == 'darwin'
qtw =
PyQt5
PyQtWebEngine
[options.package_data]
comicapi =
data/*
comictaggerlib =
ui/*
graphics/*
[tox:tox]
env_list =
format
py3.9-{none,gui,7z,cbr,icu,all}
minversion = 4.4.12
basepython = {env:tox_python:python3.9}
[testenv]
description = run the tests with pytest
package = wheel
deps =
pytest>=7
extras =
7z: 7Z
cbr: CBR
gui: GUI
icu: ICU
all: all
commands =
python -m pytest {tty:--color=yes} {posargs}
icu,all: python -c 'import importlib,platform; importlib.import_module("icu") if platform.system() != "Windows" else ...' # Sanity check for icu
[m1env]
description = run the tests with pytest
package = wheel
deps =
pytest>=7
icu,all: pyicu-binary
extras =
7z: 7Z
cbr: CBR
gui: GUI
all: 7Z,CBR,GUI
commands =
python -m pytest {tty:--color=yes} {posargs}
[testenv:py3.9-{icu,all}]
base = {env:tox_env:testenv}
[testenv:format]
labels =
build
deps =
black>=22
isort>=5.10
setup-cfg-fmt
autoflake
pyupgrade
commands =
-python ./build-tools/generate_settngs.py
-setup-cfg-fmt setup.cfg
-python -m autoflake -i --remove-all-unused-imports --ignore-init-module-imports -r comictaggerlib comicapi comictalker testing tests build-tools
-python -m isort --af --add-import 'from __future__ import annotations' .
-python -m black .
[testenv:lint]
skip_install = true
depends = format
deps =
flake8
flake8-black
flake8-encodings
flake8-isort
mypy
types-setuptools
types-requests
commands =
python -m flake8 .
-python -m mypy --ignore-missing-imports comicapi comictaggerlib comictalker
[testenv:clean]
description = Clean development outputs
labels =
release
build
depends =
format
lint
skip_install = true
commands =
-python -c 'import shutil,pathlib; \
shutil.rmtree("./build/", ignore_errors=True); \
shutil.rmtree("./dist/", ignore_errors=True); \
pathlib.Path("./comictaggerlib/ctversion.py").unlink(missing_ok=True); \
pathlib.Path("comictagger.spec").unlink(missing_ok=True)'
[testenv:wheel]
description = Generate wheel and tar.gz
labels =
release
build
depends = clean
skip_install = true
deps =
build
commands =
python -m build
[testenv:pypi-upload]
description = Upload wheel to PyPi
platform = linux
labels =
release
skip_install = true
depends = wheel
deps =
twine
id~=1.0
keyrings.alt
passenv =
GITHUB_*
ACTIONS_*
CI
setenv =
TWINE_NON_INTERACTIVE=true
commands =
python {tox_root}/build-tools/oidc-exchange.py
python -m twine upload dist/*.whl dist/*.tar.gz
[testenv:pyinstaller]
description = Generate pyinstaller executable
labels =
build
release
base = {env:tox_env:testenv}
depends =
clean
deps =
pyinstaller>=5.6.2,!=6.0.0
extras =
pyinstaller
commands =
pyrcc5 comictaggerlib/graphics/graphics.qrc -o comictaggerlib/graphics/resources.py
pyinstaller -y build-tools/comictagger.spec
python -c 'import importlib,platform; importlib.import_module("icu") if platform.system() != "Windows" else ...' # Sanity check for icu
[testenv:appimage]
description = Generate appimage executable
skip_install = true
platform = linux
base = {env:tox_env:testenv}
labels =
release
build
depends =
clean
pyinstaller
deps =
requests
allowlist_externals =
{tox_root}/build/appimagetool-x86_64.AppImage
change_dir = {tox_root}/dist/binary
commands_pre =
-python -c 'import shutil; shutil.rmtree("{tox_root}/build/", ignore_errors=True)'
python {tox_root}/build-tools/get_appimage.py {tox_root}/build/appimagetool-x86_64.AppImage
commands =
python -c 'import shutil,pathlib; shutil.copytree("{tox_root}/dist/comictagger/", "{tox_root}/build/appimage", dirs_exist_ok=True); \
shutil.copy("{tox_root}/comictaggerlib/graphics/app.png", "{tox_root}/build/appimage/app.png"); \
pathlib.Path("{tox_root}/build/appimage/AppRun").symlink_to("comictagger"); \
pathlib.Path("{tox_root}/build/appimage/AppRun.desktop").write_text( \
pathlib.Path("{tox_root}/build-tools/ComicTagger.desktop").read_text() \
.replace("/usr/local/share/comictagger/app.png", "app"))'
{tox_root}/build/appimagetool-x86_64.AppImage {tox_root}/build/appimage
[testenv:zip_artifacts]
description = Zip release artifacts
labels =
release
build
depends =
wheel
pyinstaller
appimage
deps =
dmgbuild
commands =
python ./build-tools/zip_artifacts.py
[testenv:venv]
envdir = venv
deps =
flake8
flake8-black
flake8-encodings
flake8-isort
mypy
types-setuptools
types-requests
build
pyinstaller>=5.6.2,!=6.0.0
[flake8]
max-line-length = 120
extend-ignore = E203, E501, A003, A005, T202, E701
extend-exclude = venv, scripts, build, dist, comictaggerlib/ctversion.py, comictaggerlib/graphics/resources.py
per-file-ignores =
comictaggerlib/cli.py: T20
build-tools/generate_settngs.py: T20
build-tools/oidc-exchange.py: T20
tests/*: L
[mypy]
exclude = comictaggerlib/graphics/resources.py
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
warn_redundant_casts = true
warn_unused_ignores = true
disable_error_code = import-untyped
[mypy-testing.*]
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = false
[mypy-tests.*]
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = false
[mypy-comictaggerlib.graphics.resources]
ignore_errors = True