Pillow
/
pyproject.toml
169 строк · 4.4 Кб
1[build-system]
2build-backend = "backend"
3requires = [
4"setuptools>=67.8",
5]
6backend-path = [
7"_custom_build",
8]
9
10[project]
11name = "pillow"
12description = "Python Imaging Library (Fork)"
13readme = "README.md"
14keywords = [
15"Imaging",
16]
17license = { text = "HPND" }
18authors = [
19{ name = "Jeffrey A. Clark", email = "aclark@aclark.net" },
20]
21requires-python = ">=3.9"
22classifiers = [
23"Development Status :: 6 - Mature",
24"License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND)",
25"Programming Language :: Python :: 3 :: Only",
26"Programming Language :: Python :: 3.9",
27"Programming Language :: Python :: 3.10",
28"Programming Language :: Python :: 3.11",
29"Programming Language :: Python :: 3.12",
30"Programming Language :: Python :: 3.13",
31"Programming Language :: Python :: Implementation :: CPython",
32"Programming Language :: Python :: Implementation :: PyPy",
33"Topic :: Multimedia :: Graphics",
34"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera",
35"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture",
36"Topic :: Multimedia :: Graphics :: Graphics Conversion",
37"Topic :: Multimedia :: Graphics :: Viewers",
38"Typing :: Typed",
39]
40dynamic = [
41"version",
42]
43optional-dependencies.docs = [
44"furo",
45"olefile",
46"sphinx>=7.3",
47"sphinx-copybutton",
48"sphinx-inline-tabs",
49"sphinxext-opengraph",
50]
51optional-dependencies.fpx = [
52"olefile",
53]
54optional-dependencies.mic = [
55"olefile",
56]
57optional-dependencies.tests = [
58"check-manifest",
59"coverage",
60"defusedxml",
61"markdown2",
62"olefile",
63"packaging",
64"pyroma",
65"pytest",
66"pytest-cov",
67"pytest-timeout",
68]
69optional-dependencies.typing = [
70"typing-extensions; python_version<'3.10'",
71]
72optional-dependencies.xmp = [
73"defusedxml",
74]
75urls.Changelog = "https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst"
76urls.Documentation = "https://pillow.readthedocs.io"
77urls.Funding = "https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi"
78urls.Homepage = "https://python-pillow.org"
79urls.Mastodon = "https://fosstodon.org/@pillow"
80urls."Release notes" = "https://pillow.readthedocs.io/en/stable/releasenotes/index.html"
81urls.Source = "https://github.com/python-pillow/Pillow"
82
83[tool.setuptools]
84packages = [
85"PIL",
86]
87include-package-data = true
88package-dir = { "" = "src" }
89
90[tool.setuptools.dynamic]
91version = { attr = "PIL.__version__" }
92
93[tool.cibuildwheel]
94before-all = ".github/workflows/wheels-dependencies.sh"
95build-verbosity = 1
96config-settings = "raqm=enable raqm=vendor fribidi=vendor imagequant=disable"
97test-command = "cd {project} && .github/workflows/wheels-test.sh"
98test-extras = "tests"
99
100[tool.ruff]
101fix = true
102
103lint.select = [
104"C4", # flake8-comprehensions
105"E", # pycodestyle errors
106"EM", # flake8-errmsg
107"F", # pyflakes errors
108"I", # isort
109"ISC", # flake8-implicit-str-concat
110"LOG", # flake8-logging
111"PGH", # pygrep-hooks
112"PT", # flake8-pytest-style
113"PYI", # flake8-pyi
114"RUF100", # unused noqa (yesqa)
115"UP", # pyupgrade
116"W", # pycodestyle warnings
117"YTT", # flake8-2020
118]
119lint.ignore = [
120"E203", # Whitespace before ':'
121"E221", # Multiple spaces before operator
122"E226", # Missing whitespace around arithmetic operator
123"E241", # Multiple spaces after ','
124"PT001", # pytest-fixture-incorrect-parentheses-style
125"PT007", # pytest-parametrize-values-wrong-type
126"PT011", # pytest-raises-too-broad
127"PT012", # pytest-raises-with-multiple-statements
128"PT016", # pytest-fail-without-message
129"PT017", # pytest-assert-in-except
130"PYI026", # flake8-pyi: typing.TypeAlias added in Python 3.10
131"PYI034", # flake8-pyi: typing.Self added in Python 3.11
132]
133lint.per-file-ignores."Tests/oss-fuzz/fuzz_font.py" = [
134"I002",
135]
136lint.per-file-ignores."Tests/oss-fuzz/fuzz_pillow.py" = [
137"I002",
138]
139lint.flake8-pytest-style.parametrize-names-type = "csv"
140lint.isort.known-first-party = [
141"PIL",
142]
143lint.isort.required-imports = [
144"from __future__ import annotations",
145]
146
147[tool.pyproject-fmt]
148max_supported_python = "3.13"
149
150[tool.pytest.ini_options]
151addopts = "-ra --color=yes"
152testpaths = [
153"Tests",
154]
155
156[tool.mypy]
157python_version = "3.9"
158pretty = true
159disallow_any_generics = true
160enable_error_code = "ignore-without-code"
161extra_checks = true
162follow_imports = "silent"
163warn_redundant_casts = true
164warn_unreachable = true
165warn_unused_ignores = true
166exclude = [
167'^Tests/oss-fuzz/fuzz_font.py$',
168'^Tests/oss-fuzz/fuzz_pillow.py$',
169]
170