From c6ea3e3fbee8dcdcf0a70939d7e57001af57e5bc Mon Sep 17 00:00:00 2001 From: blasty Date: Fri, 7 Aug 2026 15:33:17 +0200 Subject: Install ida-codemode from PyPI, not a sibling clone The README told people to "git clone ... ../ida-codemode" and pyproject carried a matching [tool.uv.sources] path override. That is not a convention, it is Duncan's development layout, inherited from the port patch and never questioned: it writes into the parent of the user's checkout, breaks if the directory is named anything else, and pins everyone to whatever happens to be in that working tree. ida-codemode is published on PyPI (0.3.1, the same version the clone was sitting at), so the dependency is now an ordinary versioned requirement and "uv sync" is the whole install. Verified end to end: uv lock resolves, uv sync --frozen installs from the registry, and ida_codemode.client.DatabaseHandle imports from the resulting venv. The path override is still the right answer when hacking on both at once, so that stays in the README as one "uv add --editable" line rather than as the default everyone pays for. Also fixed the plugin command it now documents: upstream's own README passes --prerelease=allow, and without it uvx refuses to resolve, because ida-codemode depends on ida-domain>=0.5.1.dev2. Checked that --install-plugin is a real flag and that the command runs, instead of copying it over on faith. --- README.md | 20 ++++++++++++++------ pyproject.toml | 5 +---- uv.lock | 22 +++++----------------- 3 files changed, 20 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 5eb00f8..88e7e00 100644 --- a/README.md +++ b/README.md @@ -32,17 +32,25 @@ this draws it. ## Install -Needs **Python ≥ 3.11**, **IDA Pro 9.4+ with idalib**, and -[ida-codemode](https://github.com/HexRaysSA/ida-codemode) checked out next to -this repo (`../ida-codemode`): +Needs **Python ≥ 3.11** and **IDA Pro 9.4+ with idalib**. ```sh -git clone https://github.com/HexRaysSA/ida-codemode ../ida-codemode uv sync ``` -Install the ida-codemode plugin in IDA too, if you want the TUI to attach to -databases you already have open in the GUI. +That pulls [ida-codemode](https://github.com/HexRaysSA/ida-codemode) from PyPI, +which is how ida-tui talks to IDA. To also attach to databases you have open in +the IDA GUI, install its plugin: + +```sh +uvx --prerelease=allow --from ida-codemode ida-codemode-mcp --install-plugin +``` + +Hacking on ida-codemode itself? Point at a checkout instead: + +```sh +uv add --editable ../ida-codemode +``` ## Run diff --git a/pyproject.toml b/pyproject.toml index 943c1e1..1171107 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ requires-python = ">=3.11" # ida-codemode supplies GUI discovery, shared idalib workers, leases, and the # execute_python/ida-domain database surface. dependencies = [ - "ida-codemode", + "ida-codemode>=0.3.1", "textual>=8", "pygments>=2", # Used directly for pseudocode highlighting. ] @@ -24,6 +24,3 @@ build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = ["idatui"] - -[tool.uv.sources] -ida-codemode = { path = "../ida-codemode", editable = true } diff --git a/uv.lock b/uv.lock index 46aeac9..9b3fc9e 100644 --- a/uv.lock +++ b/uv.lock @@ -94,7 +94,7 @@ wheels = [ [[package]] name = "ida-codemode" version = "0.3.1" -source = { editable = "../ida-codemode" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "httpx" }, { name = "ida-domain" }, @@ -103,21 +103,9 @@ dependencies = [ { name = "packaging" }, { name = "zeromcp" }, ] - -[package.metadata] -requires-dist = [ - { name = "httpx", specifier = "<1" }, - { name = "ida-domain", specifier = ">=0.5.1.dev2" }, - { name = "ida-hcli", specifier = ">=0.19.0" }, - { name = "idapro" }, - { name = "packaging" }, - { name = "zeromcp", specifier = ">=1.6.0" }, -] - -[package.metadata.requires-dev] -dev = [ - { name = "pytest", specifier = ">=9.0.3" }, - { name = "ruff", specifier = ">=0.12.0" }, +sdist = { url = "https://files.pythonhosted.org/packages/84/8b/710e2c46c1f353ee5231300b87b3b4c19e7d9db8f81dd7f42721b06c0fca/ida_codemode-0.3.1.tar.gz", hash = "sha256:5c15425d2d9bc614f0bfebedeba77ef6aa4b7b570716be7b4b2e165ef10ea603", size = 170892, upload-time = "2026-08-07T08:53:17.897Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4e/72/09746e0367564dd00fb74e73277f2548d6ee332c9d9f3e1607fbae27f50d/ida_codemode-0.3.1-py3-none-any.whl", hash = "sha256:5e5e673335951f59a386b576dc3de9d67aeb8387916b99002cf679f402b821e0", size = 76984, upload-time = "2026-08-07T08:53:17.006Z" }, ] [[package]] @@ -183,7 +171,7 @@ dev = [ [package.metadata] requires-dist = [ - { name = "ida-codemode", editable = "../ida-codemode" }, + { name = "ida-codemode", specifier = ">=0.3.1" }, { name = "pygments", specifier = ">=2" }, { name = "pytest", marker = "extra == 'dev'", specifier = ">=8" }, { name = "textual", specifier = ">=8" }, -- cgit v1.3.1-sl0p