angr/pyproject.toml
2026-08-05 09:02:54 +00:00

223 lines
5.8 KiB
TOML

[build-system]
# grpcio-tools generates angr/protos/*_pb2.py at build time. The generated code carries a protobuf gencode version
# stamp (6.31.1 for the pinned grpcio-tools) that the runtime protobuf validates at import: the runtime must be the
# same major version and no older than the stamp. Pinning grpcio-tools keeps the stamp deterministic and on the 6.x
# major, so the runtime "protobuf>=6.33.0" (and any 6.x/7.x resolution of it) can always load the generated modules.
requires = [
"setuptools>=77.0.0",
"setuptools-rust",
"pyvex==9.3.3.dev0",
"grpcio-tools~=1.80.0",
"protobuf>=6.31.1,<7",
]
build-backend = "setuptools.build_meta"
[project]
name = "angr"
description = "A multi-architecture binary analysis toolkit, with the ability to perform dynamic symbolic execution and various static analyses on binaries"
license = "BSD-2-Clause"
license-files = ["LICENSE"]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
requires-python = ">=3.12"
dependencies = [
"cxxheaderparser",
"GitPython",
"angr-data~=0.1.0",
"archinfo==9.3.3.dev0",
"cachetools",
"capstone==5.0.9",
"cffi>=1.14.0",
"claripy==9.3.3.dev0",
"cle==9.3.3.dev0",
"lmdb==2.1.1",
"msgspec; implementation_name == 'cpython'",
"mulpyplexer",
"networkx!=2.8.1,>=2.0",
"protobuf>=6.33.0",
"psutil",
"pycparser~=3.0",
"platformdirs",
"pydemumble~=0.1.3",
"pypcode~=4.0",
"pyvex==9.3.3.dev0",
"rich>=13.1.0",
"sortedcontainers",
"sympy",
"typing-extensions",
"colorama;platform_system=='Windows'",
]
dynamic = ["version"]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.urls]
Homepage = "https://angr.io/"
Repository = "https://github.com/angr/angr"
[project.optional-dependencies]
angrdb = ["sqlalchemy"]
keystone = ["keystone-engine"]
telemetry = ["opentelemetry-api"]
llm = ["pydantic-ai>=2.12.0", "mcp>=1.0.0", "fastmcp>=2.3.0"]
unicorn = ["unicorn==2.1.4"]
[project.scripts]
angr = "angr.__main__:main"
angr-mcp = "angr.mcp.__main__:main"
[dependency-groups]
dev = [
"coverage>=7.10.7",
"gcovr>=8.4",
"pylint>=4.0.5",
"pyright>=1.1.408",
"pytest>=8.3.5",
"pytest-cov>=7.0.0",
"pytest-durations>=1.4.0",
"pytest-forked>=1.6.0",
"pytest-profiling>=1.8.1",
"pytest-split>=0.10.0",
"pytest-timeout>=2.3.1",
"pytest-xdist>=3.6.1",
"ruff>=0.11.7",
"sortedcontainers-stubs>=2.4.3",
]
docs = ["furo", "myst-parser", "sphinx", "sphinx-autodoc-typehints"]
extras = ["angr[angrdb,keystone,unicorn,llm]", "pysoot"]
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
exclude = ["tests*"]
namespaces = false
[tool.setuptools.package-data]
angr = ["py.typed", "unicornlib.*", "rustylib.*"]
[tool.setuptools.dynamic]
version = { attr = "angr.__version__" }
[[tool.setuptools-rust.ext-modules]]
target = "angr.rustylib"
path = "native/angr/Cargo.toml"
debug = false
[tool.distutils.bdist_wheel]
py_limited_api = "cp312"
[tool.uv]
default-groups = ["dev", "extras"]
[tool.uv.sources]
angr-data = { git = "https://github.com/angr/angr-data.git", branch = "master" }
archinfo = { git = "https://github.com/angr/archinfo.git", branch = "master" }
pyvex = { git = "https://github.com/angr/pyvex.git", branch = "master" }
cle = { git = "https://github.com/angr/cle.git", branch = "master" }
claripy = { git = "https://github.com/angr/claripy.git", branch = "master" }
pysoot = { git = "https://github.com/angr/pysoot.git", branch = "master" }
[tool.ruff]
line-length = 120
target-version = "py312"
exclude = [
"*_pb2.py", # Autogenerated protobuf files
]
[tool.ruff.lint]
extend-select = [
"FURB",
"I",
"PIE",
"RET",
"RSE",
"RUF",
"SIM",
"TID252",
"UP",
]
ignore = [
"BLE001", # Catching Exception
"DTZ", # timezones
"E741", # Variable names
"EXE",
"RET501", # rewrites "return None" to "return" if it's the only return statement; pylint then removes the return
"RUF012", # FIXME: Annotate class variables
"RUF007", # Prefer `itertools.pairwise()` over `zip()` when iterating over successive pairs
"S112", # Blind exception handlers
"TRY002", # Create your own Exceptions
]
[tool.ruff.lint.per-file-ignores]
"angr/__init__.py" = [
"E402", # Package root: bootstrap code is interleaved with imports and the import order is load-bearing
]
"angr/engines/soot/expressions/*" = [
"N999",
]
"angr/misc/bug_report.py" = [
"F821", # name not found
]
"angr/procedures/**" = [
"N999",
]
"angr/procedures/definitions/*" = [ # TODO: Move to exclude
"F601", # TODO: BUG! This hides bugs! See: https://github.com/angr/angr/issues/3685
"E501", # No line length check
"F401",
]
"angr/state_plugins/solver.py" = [
"E501", # Long docstrings with examples
]
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
[tool.pylint.main]
load-plugins = ["pylint.extensions.no_self_use", "pylint.extensions.bad_builtin"]
[tool.pylint."messages control"]
disable = [
# Categories
"design",
"format", # Ruff handles formatting
# Individual rules
"abstract-method",
"fixme",
"invalid-name",
"missing-function-docstring",
"missing-module-docstring",
"unidiomatic-typecheck",
"arguments-differ",
"signature-differs",
"too-many-nested-blocks",
]
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = [
"tests",
]
[tool.coverage.run]
branch = true
source = [ "angr" ]
parallel = true
patch = [ "_exit" ]
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
"if TYPE_CHECKING:",
"if __name__ == .__main__.:"
]