[build-system] requires = ["hatchling>=1.25"] build-backend = "hatchling.build" [project] name = "sh2-python" version = "0.1.0.dev0" description = "Readable, pure-Python Hitachi SH7604 (SH-2) core: the CPU and its on-chip modules" readme = "README.md" # The floor is the newest Python PyPy supports (3.11 as of PyPy 7.3.x); raise it when PyPy does. requires-python = ">=3.11" license = { file = "LICENSE" } authors = [{ name = "alewman" }] classifiers = [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries", "Topic :: System :: Emulators", ] dependencies = [] [project.optional-dependencies] dev = [ "pytest>=8", # Pinned: `ruff format --check` must see the formatter the tree was formatted with. "ruff==0.16.8", ] [tool.hatch.build.targets.wheel] packages = ["src/sh2_python"] [tool.ruff] line-length = 100 target-version = "py311" exclude = [".git", ".pytest_cache", "reference"] [tool.ruff.lint] select = ["E", "W", "F", "I", "UP", "B", "C4", "SIM", "PERF", "RUF"] # Hitachi's register names (R0-R15, SR, GBR, PC) are upper case, which ruff # mistakes for constants (SIM300) and ambiguous names (E741). ignore = ["SIM300", "E741", "SIM108", "SIM109", "SIM905"] [tool.ruff.lint.isort] known-first-party = ["sh2_python"] [tool.ruff.format] quote-style = "double" indent-style = "space" [tool.pytest.ini_options] testpaths = ["tests"] # The MAME replays and the rung-1 corpus take minutes: run them with -m slow. addopts = "--strict-markers -ra -m 'not slow'" pythonpath = ["src", "tests", "."] markers = ["slow: long runs (rung-1 corpus, MAME trace replays); pytest -m slow"]