pyproject.toml
Rama main · réplica de lectura del repositorio original.
[build-system]
requires = ["setuptools>=84.2.1,<85"]
build-backend = "setuptools.build_meta"
[project]
name = "pokesim"
version = "0.7.0.dev0"
description = "One application for autonomous Pokémon Red, Blue, Yellow, Gold, Silver and Crystal adventures with live views and cable trading"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE", "THIRD_PARTY_NOTICES.md"]
requires-python = ">=3.11"
dependencies = [
# Not on PyPI: GitHub release wheels, so pip, pipx and uv all resolve them from the wheel metadata.
# Core 0.11.0 asks for pyboy-rs>=0.1.2,<0.2 and the matching wheel below satisfies it. Both carry markers for
# exactly the platforms that have a pyboy-rs wheel. Core must carry the marker too: its own requirement on
# pyboy-rs would otherwise send pip to look that name up on PyPI where the platform has no wheel (Windows ARM64,
# 32-bit ARM, FreeBSD). Neither name is a PyPI project of ours, so no install may ever depend on PyPI for them.
# pokecore's source is the packages/pokecore workspace member, and uv, CI and the container install it from
# there (tool.uv.sources below). This URL is the released copy that pip and pipx users get, so
# tools/release.py check-pins fails when its version differs from the member's.
"pokecore[emulator] @ https://github.com/afk-sapien/pokesim-core/releases/download/v0.11.0/pokecore-0.11.0-py3-none-any.whl#sha256=0a083118b5542a4ea1e148ae52133a3126f07a2e10fbb34d706291ce17d85ec2 ; (sys_platform == 'linux' and (platform_machine == 'x86_64' or platform_machine == 'aarch64')) or (sys_platform == 'darwin' and (platform_machine == 'x86_64' or platform_machine == 'arm64')) or (sys_platform == 'win32' and (platform_machine == 'AMD64' or platform_machine == 'x86_64'))",
"pyboy-rs @ https://github.com/afk-sapien/pyboy-rs/releases/download/v0.1.5/pyboy_rs-0.1.5-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl#sha256=85d000b9d6607f449b6a945bed7923ca3e1adb5bb97dc1606508501eef1da89d ; sys_platform == 'linux' and platform_machine == 'x86_64'",
"pyboy-rs @ https://github.com/afk-sapien/pyboy-rs/releases/download/v0.1.5/pyboy_rs-0.1.5-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl#sha256=b332de4bec17fbd4c9f5bca3c399923c98df382344d9394174a2474cd5056759 ; sys_platform == 'linux' and platform_machine == 'aarch64'",
"pyboy-rs @ https://github.com/afk-sapien/pyboy-rs/releases/download/v0.1.5/pyboy_rs-0.1.5-cp311-abi3-macosx_10_12_x86_64.whl#sha256=e604f8d4e0bc33e6d37ebc0bf77e85beab5223e68324ff57f175a56d6ff9c9f3 ; sys_platform == 'darwin' and platform_machine == 'x86_64'",
"pyboy-rs @ https://github.com/afk-sapien/pyboy-rs/releases/download/v0.1.5/pyboy_rs-0.1.5-cp311-abi3-macosx_11_0_arm64.whl#sha256=2ff240cc2156ca201c6dca0ad2c2829c2deb4b4a3428553e6bd0e23c91f6f172 ; sys_platform == 'darwin' and platform_machine == 'arm64'",
"pyboy-rs @ https://github.com/afk-sapien/pyboy-rs/releases/download/v0.1.5/pyboy_rs-0.1.5-cp311-abi3-win_amd64.whl#sha256=2517a5e44acc30f380e0070a8492a4d3241063b0a72638f87a84bd5651b3d9f7 ; sys_platform == 'win32' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"fastapi>=0.110",
"uvicorn[standard]>=0.53.0",
"pillow>=10",
"numpy",
"httpx>=0.27",
"psutil>=7,<8",
# Accounts: argon2id password hashes, and ID token checks for OpenID Connect logins.
"argon2-cffi>=23.1",
"joserfc>=1.0",
]
[project.urls]
Repository = "https://github.com/afk-sapien/PokeSim"
Issues = "https://github.com/afk-sapien/PokeSim/issues"
[project.optional-dependencies]
dev = ["pytest", "pytest-xdist"]
browser-test = [
"playwright>=1.50",
]
acceleration = ["numba>=0.61,<0.68"]
[project.scripts]
pokesim = "pokesim.__main__:main"
pokesim-prepare-data = "pokesim.prepare_data:main"
pokesim-desktop = "pokesim.desktop:main"
[tool.pytest.ini_options]
pythonpath = ["."]
# pokecore's tests run from packages/pokecore with its own settings.
testpaths = ["tests"]
# Tests run on twelve workers, the cores of the local tests slice, so a full run leaves the machine
# usable. loadgroup spreads single tests and keeps each xdist_group on one worker. Pass -n 0 to run in
# one process.
addopts = "-n 12 --dist loadgroup"
filterwarnings = ["ignore::UserWarning"]
markers = ["slow: a long test that runs only when POKESIM_SLOW_TESTS=1, as the local nightly run sets"]
[tool.setuptools.package-data]
pokesim = ["web/static/*", "web/static/fonts/*", "broker/static/*", "_build.json"]
[tool.setuptools.packages.find]
include = ["pokesim*"]
[tool.ruff]
line-length = 130
extend-exclude = [".reference", "build"]
[tool.ruff.lint]
# Pyflakes and syntax errors: the checks that find real mistakes without restyling the code.
select = ["E9", "F"]
[tool.ruff.lint.per-file-ignores]
# pytest fixtures are imported and then named as test parameters.
"tests/*" = ["F811", "F401"]
[tool.uv]
# pyboy-rs ships abi3 wheels for exactly these platforms, so the lock covers exactly these.
environments = [
"sys_platform == 'linux' and platform_machine == 'x86_64'",
"sys_platform == 'linux' and platform_machine == 'aarch64'",
"sys_platform == 'darwin' and platform_machine == 'x86_64'",
"sys_platform == 'darwin' and platform_machine == 'arm64'",
"sys_platform == 'win32' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
]
[tool.uv.workspace]
# pokecore lives here and is still published as its own package, because other projects install it alone.
members = ["packages/pokecore"]
[tool.uv.sources]
pokecore = { workspace = true }