[build-system] requires = ["hatchling>=1.25"] build-backend = "hatchling.build" [project] name = "gameboy-python" version = "0.1.0.dev0" description = "Readable, pure-Python Game Boy and Game Boy Color emulator board built on sm83-python" readme = "README.md" # The floor is the newest Python PyPy supports (3.11 as of PyPy 7.3.23); raise it when PyPy does. requires-python = ">=3.11" license = { file = "LICENSE" } authors = [{ name = "alewman" }] classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: System :: Emulators", ] # The CPU and sound cores, pinned by revision, never a local path. Develop against local # checkouts with `pip install -e ../sm83-python -e ../gb-apu-python` after installing this. dependencies = [ # 1f312fa = sm83-python 95f2b8b and d4393c6 = gb-apu-python f0a7f48 after their history # rewrites of 2026-11-21 (same trees). "sm83-python @ git+https://github.com/alewman/sm83-python.git@1f312fa3c9e60c2fc43d7044ddf2a95219d0d36b", "gb-apu-python @ git+https://github.com/alewman/gb-apu-python.git@d4393c6af0d634e637ff63a421278fd0c6b6700f", ] [project.optional-dependencies] # The desktop window (gameboy_python.frontend): SDL through pygame-ce, which ships PyPy wheels. frontend = ["pygame-ce>=2.5"] dev = [ "pytest>=8", # Pinned: `ruff format --check` must see the formatter the tree was formatted with. "ruff==0.16.8", ] [project.scripts] gameboy-python = "gameboy_python.__main__:main" [tool.hatch.build.targets.wheel] packages = ["src/gameboy_python"] [tool.hatch.metadata] allow-direct-references = true [tool.ruff] line-length = 100 target-version = "py311" extend-exclude = ["reference", "docs"] [tool.ruff.lint] select = ["E", "W", "F", "I", "UP", "B", "C4", "SIM", "PERF", "RUF"] # Nested ifs and if/else blocks are kept where each condition carries its own comment (the # board is a reference: readability first); class-level tables are constants, not mutated. ignore = ["SIM102", "SIM108", "RUF012"] [tool.ruff.lint.per-file-ignores] "scripts/*" = ["E501"] [tool.ruff.lint.isort] known-first-party = ["gameboy_python"] [tool.ruff.format] quote-style = "double" indent-style = "space" [tool.pytest.ini_options] testpaths = ["tests"] addopts = "--strict-markers -ra" pythonpath = ["src", "."] markers = [ "slow: a test-ROM suite or oracle run; `pytest -m \"not slow\"` is the quick loop", ]