[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"). "m68000-python @ git+https://github.com/alewman/m68000-python@38dbd0f3b6622d715d14f4c0b90fcdf84a12692d", # 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@b62891b9bac68da196ccb47c77e1e579f207dc1c", # The FM chip, extracted from this repository at efcc6bb with its history. "ym2612-python @ git+https://github.com/alewman/ym2612-python@2c2ab235aed619b395ba152111cd79a6193390b3", # The PSG, extracted from this repository and sms-python with both histories. "sn76489-python @ git+https://github.com/alewman/sn76489-python@b0acbc863c87259b3bb120df1a5886980462e25c", ] [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)"]