[build-system] requires = ["hatchling>=1.25"] build-backend = "hatchling.build" [project] name = "famicom-python" version = "0.1.0.dev0" description = "Readable, pure-Python Famicom and NES emulator built on 6502-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" }] # A git revision, never a local path, until 6502-python is released: main at # 9dc34bd (RP2A03 #2, second-to-last-cycle polling #3, branch poll points #5, # per-CPU ANE/LXA constants #6, dma_stalled and note_stall #7, CPUFrame #8). dependencies = [ # e73f471 = 9dc34bd after 6502-python's history rewrite of 2026-11-21 (same tree). "6502-python @ git+https://github.com/alewman/6502-python@e73f471f740ae11aea978b0d70146d68480dca03", # The VRC7's sound (mapper 85): the restarted ym2413-python (2026-11-13), written # from documents, pinned by git revision (67fdb1e: f88dccf after the 2026-11-22 history # rewrite, which took the GPL harness out; the same package). "ym2413-python @ git+https://github.com/alewman/ym2413-python@67fdb1e983b62a5c1334fead4e8b157af45cd3a1", # The Sunsoft 5B's sound (mapper 69): the YM2149 variant. a3bb485 (2026-11-23; was # e9420aa, e244a09 before the 2026-11-22 history rewrite): main, whose src/ differs # from e9420aa's only by SPDX lines; ay8910-rust transcribes a3bb485, so the two match # exactly. "ay8910-python @ git+https://github.com/alewman/ay8910-python@a3bb48511db96356581b010e87a6476eaa03e9bc", # The PlayChoice-10's supervisor (supervisor.py). b59c80b (2026-11-23; was ">=0.4.0" # from PyPI): z80-python's main, as megadrive-python pins it, with two hardware fixes # 0.4.0 lacks (EI re-arms the interrupt delay, d37c8e8; RESET clears I and R, # 1cec5c9) and the access-timing table. The family's Rust Z80s (z80-rust, # z80-rust-fast) transcribe b59c80b, so the PlayChoice-10 can be carried down. "z80-python @ git+https://github.com/alewman/z80-python@b59c80b88086299f277d4d21d82a09e112acdaaf", ] [project.optional-dependencies] # The desktop window (famicom_python.frontend): SDL through pygame-ce, which ships PyPy wheels. frontend = ["pygame-ce>=2.5"] dev = [ "pytest>=8", # Pinned: `ruff format --check` in CI must see the formatter the tree was formatted with. "ruff==0.16.8", ] [project.scripts] famicom-python = "famicom_python.__main__:main" [tool.hatch.metadata] allow-direct-references = true [tool.hatch.build.targets.wheel] packages = ["src/famicom_python"] [tool.ruff] line-length = 100 target-version = "py311" extend-exclude = ["reference", "tests/test_roms", "tests/mame_traces"] [tool.ruff.lint] select = ["E", "W", "F", "I", "UP", "B", "C4", "SIM", "PERF", "RUF"] [tool.ruff.lint.isort] known-first-party = ["famicom_python"] [tool.pytest.ini_options] testpaths = ["tests"] addopts = "--strict-markers -ra -m 'not slow'" pythonpath = ["src", "tests"] markers = ["slow: test ROMs that run for many emulated seconds (pytest -m slow)"]