-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
pyproject.toml
198 lines (183 loc) · 5.37 KB
/
pyproject.toml
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
[build-system]
requires = [
# setuptools >=64.0.0 might break editable installs
# https://github.com/pypa/setuptools/issues/3548
"setuptools >=61.0.0",
"setuptools_scm[toml]>=6.2",
"wheel>=0.37.1",
"cffi>=1.15",
"pycparser>=2.14",
"pcpp==1.30",
"requests>=2.28.1",
]
build-backend = "setuptools.build_meta"
[project]
name = "tcod"
dynamic = ["version"]
description = "The official Python port of libtcod."
authors = [{ name = "Kyle Benesch", email = "[email protected]" }]
readme = "README.rst"
requires-python = ">=3.8"
license = { text = "Simplified BSD License" }
dependencies = [
"cffi>=1.15",
'numpy>=1.21.4; implementation_name != "pypy"',
"typing_extensions>=4.12.2",
]
keywords = [
"roguelike",
"cffi",
"Unicode",
"libtcod",
"field-of-view",
"pathfinding",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Win32 (MS Windows)",
"Environment :: MacOS X",
"Environment :: X11 Applications",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Games/Entertainment",
"Topic :: Multimedia :: Graphics",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
[project.entry-points.pyinstaller40]
hook-dirs = "tcod.__pyinstaller:get_hook_dirs"
[project.urls]
Homepage = "https://github.com/libtcod/python-tcod"
Documentation = "https://python-tcod.readthedocs.io"
Changelog = "https://github.com/libtcod/python-tcod/blob/main/CHANGELOG.md"
Source = "https://github.com/libtcod/python-tcod"
Tracker = "https://github.com/libtcod/python-tcod/issues"
Forum = "https://github.com/libtcod/python-tcod/discussions"
[tool.distutils.bdist_wheel]
py-limited-api = "cp38"
[tool.setuptools_scm]
write_to = "tcod/version.py"
[tool.black]
line-length = 120
target-version = ["py38"]
[tool.isort]
profile = "black"
py_version = "38"
skip_gitignore = true
line_length = 120
[tool.pytest.ini_options]
minversion = "6.0"
required_plugins = ["pytest-cov", "pytest-benchmark"]
testpaths = ["tcod/", "tests/", "docs/"]
addopts = [
"--doctest-modules",
"--doctest-glob='*.rst'",
"--cov=tcod",
"--capture=sys",
"--ignore=tcod/__pyinstaller",
]
log_file_level = "DEBUG"
faulthandler_timeout = 5
filterwarnings = [
"ignore::DeprecationWarning:tcod.libtcodpy",
"ignore::PendingDeprecationWarning:tcod.libtcodpy",
"ignore:This class may perform poorly and is no longer needed.::tcod.map",
"ignore:'import tcod as libtcodpy' is preferred.",
]
[tool.mypy]
files = ["."]
python_version = "3.9"
warn_unused_configs = true
show_error_codes = true
disallow_subclassing_any = true
disallow_any_generics = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
implicit_reexport = false
strict_equality = true
exclude = [
"build/",
"venv/",
"libtcod/",
"docs/",
"distribution/",
"termbox/",
"samples_libtcodpy.py",
]
[[tool.mypy.overrides]]
module = "numpy.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tcod.version"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tcod._libtcod"
ignore_missing_imports = true
[tool.ruff]
extend-exclude = ["libtcod"] # Ignore submodule
line-length = 120
[tool.ruff.lint] # https://docs.astral.sh/ruff/rules/
select = [
"C90", # mccabe
"E", # pycodestyle
"W", # pycodestyle
"F", # Pyflakes
"I", # isort
"UP", # pyupgrade
"YTT", # flake8-2020
"ANN", # flake8-annotations
"S", # flake8-bandit
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"EM", # flake8-errmsg
"EXE", # flake8-executable
"RET", # flake8-return
"ICN", # flake8-import-conventions
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"PL", # Pylint
"TRY", # tryceratops
"RUF", # NumPy-specific rules
"G", # flake8-logging-format
"D", # pydocstyle
]
ignore = [
"E501", # line-too-long
"S101", # assert
"S301", # suspicious-pickle-usage
"S311", # suspicious-non-cryptographic-random-usage
"ANN101", # missing-type-self
"ANN102", # missing-type-cls
"D203", # one-blank-line-before-class
"D204", # one-blank-line-after-class
"D213", # multi-line-summary-second-line
"D407", # dashed-underline-after-section
"D408", # section-underline-after-name
"D409", # section-underline-matches-section-length
"D206", # indent-with-spaces
"W191", # tab-indentation
]
[tool.ruff.lint.pydocstyle] # https://docs.astral.sh/ruff/settings/#lintpydocstyle
convention = "google"