[build-system] requires = ["hatchling>=1.25"] build-backend = "hatchling.build" [project] name = "megadrive-python" version = "0.1.0.dev0" description = "Readable, pure-Python Sega Mega Drive / Genesis emulator built on m68000-python, z80-python and ym2612-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" }] dependencies = [ # Not on PyPI: pinned by git revision (docs/handoff-brief.md). For development, # install the local clone at this revision first (docs/worklog.md, "Environment"). # 4454d54: m68000-python's history reset (2026-11-20), the tree of its dd93178 (wave 2 # with the second pass: the divide clocks refitted, nothing resting on MAME's # header-less files; an unpickled CPU still builds its table, as c827cca did). "m68000-python @ git+https://github.com/alewman/m68000-python@4454d5457842fabe0fac92272589945c1eed7234", # 0.4.0 introduced the callables contract the board is built for; the access-timing # table (z80_python.timing, PR #19) is not released yet, so the merge is pinned. "z80-python @ git+https://github.com/alewman/z80-python@b59c80b88086299f277d4d21d82a09e112acdaaf", # The FM chip and the PSG: the restarted ym2612-python and sn76489-python # (2026-11-12/13), written from documents. They have no remotes yet: install them # first from local checkouts (pip install -e ../ym2612-python -e ../sn76489-python). # To be pinned by git revision once they have them. "ym2612-python", "sn76489-python", ] [project.urls] Homepage = "https://github.com/alewman/megadrive-python" Documentation = "https://github.com/alewman/megadrive-python/tree/main/docs" Issues = "https://github.com/alewman/megadrive-python/issues" [project.scripts] megadrive-python-play = "megadrive_python.frontend:main" [project.optional-dependencies] # Virtua Racing's DSP (megadrive_python.svp); without it that cartridge loads as plain ROM. svp = ["ssp1601-python @ git+https://github.com/alewman/ssp1601-python@c863a2c672ac8baa8e80794d11d28886941ddfe4"] # The desktop window (megadrive_python.frontend): SDL through pygame-ce, which ships PyPy # wheels. The board itself stays dependency-free. 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", ] [tool.hatch.metadata] allow-direct-references = true [tool.hatch.build.targets.wheel] packages = ["src/megadrive_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 = ["megadrive_python"] [tool.pytest.ini_options] testpaths = ["tests"] addopts = "--strict-markers -ra -m 'not slow'" pythonpath = ["src", "tests"] markers = ["slow: long-running replays against MAME logs (pytest -m slow)"]