forked from fifengine/fifengine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
185 lines (160 loc) · 4.68 KB
/
pyproject.toml
File metadata and controls
185 lines (160 loc) · 4.68 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
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-FileCopyrightText: 2005 - 2026 Fifengine contributors
# ---------------------------------------------------------------------
# Project
# ---------------------------------------------------------------------
[project]
name = "libfife"
version = "0.5.0"
description = "FIFE library"
license="LGPL-2.1-or-later"
requires-python = ">=3.13"
dependencies = []
authors = [
{ name = "Fifengine contributors" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: C++",
]
[project.urls]
Homepage = "https://www.fifengine.net"
Repository = "https://github.com/fifengine/fifengine"
Source = "https://github.com/fifengine/fifengine"
Changelog = "https://github.com/fifengine/fifengine/blob/master/CHANGELOG.md"
Documentation = "https://docs.fifengine.net/"
Tracker = "https://github.com/fifengine/fifengine/issues"
[dependency-groups]
dev = [
"ruff",
"black",
"isort",
"mypy",
"pytest",
"pytest-cov"
]
test = [
"pytest",
"pytest-cov",
]
docs = [
"sphinx>=7.0",
"furo>=2024.1",
"sphinx-autodoc-typehints",
"myst-parser",
]
# ---------------------------------------------------------------------
# Build System
# ---------------------------------------------------------------------
# 1. scikit_build_core -> drives CMake build process
# 2. cibuildwheel -> orchestrates
# 3. vcpkg -> dependencies
# ---------------------------------------------------------------------
# External dependencies are not bundled by default:
# libfifechan_sdl2.so, libfifechan_opengl.so, SDL2, OpenAL, etc.
# cibuildwheel uses the following tools internally to bundle the dependencies
# into redistributable platform wheels:
# Windows: delevewheel
# Linux: auditwheel
# Mac: delocate
# The tools copy .so/.dylib/.dll files into the wheel and patch load paths.
# This is done during CI via cibuildwheel as a post-build step of the wheel.
# ---------------------------------------------------------------------
[build-system]
requires = [
"scikit-build-core",
"packaging"
]
build-backend = "scikit_build_core.build"
# We need to pass in VCPKG_TARGET_TRIPLET, CMAKE_TOOLCHAIN_FILE for VCPKG.
[tool.scikit-build]
build.verbose = true
cmake.build-type = "Release"
cmake.args = ["-DPYTHON_SITE_PACKAGES=."]
[tool.scikit-build.wheel]
install-dir = ""
exclude = ["**/__pycache__", "**/*.pyc", "**/.git"]
[[tool.scikit-build.wheel.packages]]
path = "."
dest = "fife"
include = [
"AUTHORS",
"CHANGELOG.md",
"LICENSE.md",
"README.md"
]
# ---------------------------------------------------------------------
# cibuildwheel https://cibuildwheel.pypa.io/en/stable/
# ---------------------------------------------------------------------
[tool.cibuildwheel]
build = "cp{313,314}-*" # lowest version must equal project.requires-python
skip = "*-musllinux_*"
[tool.cibuildwheel.linux]
archs = ["x86_64"]
manylinux-x86_64-image = "manylinux_2_28"
[tool.cibuildwheel.windows]
archs = ["AMD64"]
before-build = "pip install wheel delvewheel"
# ---------------------------------------------------------------------
# check-wheel-contents
# ---------------------------------------------------------------------
[tool.check-wheel-contents]
toplevel = [
"fife",
"libfife.libs"
]
ignore = [
"W010" # TODO? toplevel library directory contains no Python modules
]
# ---------------------------------------------------------------------
# Additional Python Tools
# ---------------------------------------------------------------------
[tool.black]
line-length = 90
target-version = ["py313"]
extend-exclude = '^(src/swigwrappers/|src/python/fife/(fife|fifechan)\.py$)'
[tool.ruff]
line-length = 90
target-version = "py313"
extend-exclude = [
"build",
"out",
"vcpkg_installed",
"src/swigwrappers",
"src/python/fife/fife.py",
"src/python/fife/fifechan.py"
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
# https://docs.astral.sh/ruff/rules/
[tool.ruff.lint]
select = [
"E", # pycodestyle-error
"W", # pycodestyle-warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"D", # pydocstyle
"DOC", # pydoclint
]
[tool.ruff.lint.per-file-ignores]
"*.py" = ["E501"] # line too long
"tests/*" = ["D"] # pydocstyle
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.pydoclint]
style = "numpy"
exclude = ["tests/", "docs/"]
[tool.mypy]
python_version = "3.13"
files = ["src/python/fife"]
ignore_missing_imports = true
show_error_codes = true
exclude = "^(tests|build|out|vcpkg_installed)/"
[tool.coverage.run]
source = ["src/python/fife"]
omit = ["*/fife.py", "*/fifechan.py"]