Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
107 lines (95 loc) · 4.13 KB
/
Copy pathpyproject.toml
File metadata and controls
107 lines (95 loc) · 4.13 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
[build-system]
# Keep the PEP 517 and Conan pybind11 versions in lock-step.
requires = [
"scikit-build-core-conan==0.9.2",
"conan==2.30.0",
"pybind11==3.0.1",
"auditwheel==6.4.2; sys_platform == 'linux'",
"endstone==0.11.11; sys_platform == 'linux'",
"patchelf==0.17.2.4; sys_platform == 'linux'",
"wheel==0.46.2; sys_platform == 'linux'",
]
build-backend = "papi_build_backend"
backend-path = ["."]
[project]
name = "endstone-papi"
dynamic = ["version"]
authors = [
{ name = "Vincent Wu", email = "magicdroidx@gmail.com" },
{ name = "daoge_cmd", email = "3523206925@qq.com" },
{ name = "ReallocAll", email = "ReallocAll@outlook.com" }
]
description = "PlaceholderAPI framework for Endstone, with C++ and Python expansion providers."
readme = "README.md"
requires-python = ">=3.10"
keywords = ["plugin", "python", "c++", "minecraft", "bedrock", "papi", "placeholder"]
license = "MIT"
license-files = ["LICENSE"]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: C++",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
]
# Build dependencies remain pinned independently of this runtime range.
dependencies = ["endstone>=0.11.8,<0.12"]
[project.urls]
Homepage = "https://github.com/EndstoneMC/papi"
Issues = "https://github.com/EndstoneMC/papi/issues"
[project.entry-points."endstone"]
papi = "endstone_papi:PlaceholderAPIPlugin"
[project.optional-dependencies]
dev = ["pytest", "ruff"]
[tool.scikit-build]
cmake.version = ">=3.29"
cmake.args = ["-G Ninja"]
cmake.build-type = "RelWithDebInfo"
cmake.define = { BUILD_TESTING = "OFF", PAPI_BUILD_EXAMPLES = "OFF" }
wheel.packages = ["endstone_papi"]
install.components = ["python"]
install.strip = false
# Single version source: derive the wheel version from the CMake project() command
# so CMakeLists.txt is the only file that needs updating at release time.
[tool.scikit-build.metadata]
version.provider = "scikit_build_core.metadata.regex"
version.input = "CMakeLists.txt"
version.regex = "project\\([^)]*VERSION\\s+(?P<value>[0-9]+\\.[0-9]+\\.[0-9]+)"
[tool.scikit-build-core-conan]
config = ["tools.cmake.cmaketoolchain:generator=Ninja"]
[tool.pytest.ini_options]
testpaths = ["tests/python"]
[tool.ruff]
line-length = 120
lint.extend-select = ["I", "E", "F"]
# Endstone requires mutable command and permission metadata.
lint.per-file-ignores = { "endstone_papi/plugin.py" = ["RUF012"] }
extend-exclude = [
"examples/python",
]
[tool.cibuildwheel]
build = ["cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*"]
skip = ["*-musllinux*", "*_i686", "*-win32"]
[tool.cibuildwheel.linux]
manylinux-x86_64-image = "ghcr.io/endstonemc/manylinux_2_31_x86_64"
environment = { CC = "/usr/bin/clang-20", CXX = "/usr/bin/clang++-20" }
# Wheel repair requires Endstone's exact hashed runtime SONAMEs.
before-build = "pip install ninja wheel endstone==0.11.11"
# The backend repairs wheels built directly or from an sdist.
repair-wheel-command = ""
before-all = [
"apt-get update -y -q && apt-get install -y -q build-essential lsb-release wget software-properties-common gnupg python3-pip xz-utils",
"for attempt in 1 2 3; do if wget -qO /tmp/llvm.sh https://apt.llvm.org/llvm.sh && chmod +x /tmp/llvm.sh && /tmp/llvm.sh 20 && apt-get install -y -q clang-tools-20; then break; else status=$?; fi; if [ \"$attempt\" -eq 3 ]; then exit \"$status\"; fi; if [ \"$attempt\" -eq 1 ]; then sleep 5; else sleep 15; fi; done",
"python3 -m pip install 'cmake==3.31.6' 'ninja==1.11.1.4'",
"/usr/bin/clang-20 --version | tee /tmp/toolchain-provenance.txt",
"/usr/bin/clang-20 --version | grep -E 'clang version 20\\.'",
"dpkg-query -W -f='clang_nvr=${Package}-${Version}-${Architecture}\\n' clang-20 | tee -a /tmp/toolchain-provenance.txt",
"python /project/tools/build_linux_runtime.py",
]
[tool.cibuildwheel.windows]
environment = { CC = "clang-cl", CXX = "clang-cl" }