Skip to content

Fix package installation by switching to hatchling build backend#2

Merged
mark-goodfire merged 2 commits intogoodfire-ai:mainfrom
mjclarke94:fix/package-installation
Feb 11, 2026
Merged

Fix package installation by switching to hatchling build backend#2
mark-goodfire merged 2 commits intogoodfire-ai:mainfrom
mjclarke94:fix/package-installation

Conversation

@mjclarke94
Copy link
Copy Markdown
Contributor

Problem

Installing scribe as a package (e.g., uv add git+https://github.com/goodfire-ai/scribe.git) would fail with:

ModuleNotFoundError: No module named 'scribe.cli'

This occurred because subpackages (scribe.cli, scribe.notebook, scribe.providers) weren't being included in the built distribution. Editable installs (uv pip install -e .) worked fine since they reference the source directory directly.

Solution

  • Added [build-system] configuration with hatchling as the build backend
  • Hatchling automatically discovers and includes all Python subpackages in the distribution
  • Updated README installation instructions to use uv add as the default installation method

Testing

Verified that uv add git+<fork-url>@fix/package-installation successfully installs scribe with all subpackages accessible, and the scribe CLI command works as expected.

…figuration

Previously, installing scribe as a package (e.g., via 'uv add git+...')
would fail with 'ModuleNotFoundError: No module named scribe.cli' because
subpackages weren't included in the distribution. Editable installs worked
fine. Switched to hatchling build backend which automatically discovers
and includes all subpackages in the built package.
@nix-apollo
Copy link
Copy Markdown

Would be great to have this merged!

Or some other fix that allows scribe to be installed as a dependency straight from git, rather than local files. Several fixes are possible.

@BorisTheBrave
Copy link
Copy Markdown

I'd like this too.

I note that if you did want to stick to setuputils, a fix would be

[tool.setuptools]
packages = { find = {} }

@mark-goodfire mark-goodfire self-assigned this Feb 11, 2026
Copy link
Copy Markdown
Collaborator

@mark-goodfire mark-goodfire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the contribution! Merged 👍

@mark-goodfire mark-goodfire merged commit 292dba4 into goodfire-ai:main Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants