Metadata-Version: 2.5
Name: hatch-angee
Version: 1.1.0
Summary: Hatchling layout and metadata defaults for in-place Angee addon distributions.
Project-URL: Homepage, https://github.com/ang-ee/hatch-angee
Project-URL: Issues, https://github.com/ang-ee/hatch-angee/issues
Author-email: "Angee, Inc." <hi@angee.ai>
License-Expression: AGPL-3.0-or-later
License-File: LICENSE
Keywords: addons,angee,build,hatch,hatchling,plugin
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Hatch
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.11
Requires-Dist: hatchling>=1.27
Provides-Extra: dev
Requires-Dist: editables>=0.3; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Description-Content-Type: text/markdown

# hatch-angee

A small PEP 517 backend for one in-place Angee addon per distribution. Hatchling
owns metadata and archives; this backend supplies package layout, direct-reference
defaults and an opt-in addon entry point through Hatchling's native metadata hook.

```toml
build-system = { requires = ["hatch-angee>=1.1,<2"], build-backend = "hatch_angee" }

[project]
name = "acme-notes"
version = "1.0.0"
keywords = ["notes", "productivity"]
dynamic = ["entry-points"]
```

Put this file inside `addons/acme/notes/`, alongside its Python package content.
The hook generates `acme.notes = "acme.notes"` in the `angee.addons` group. It
normalizes the distribution name, uses its first hyphen to separate the namespace,
and turns remaining hyphens into underscores: `acme-integrate-notes` becomes
`acme.integrate_notes`. This rule uses no parent checkout and also works from an
unpacked sdist. A missing namespace or a mismatched package directory is an error.

Use an explicit entry point instead of `dynamic = ["entry-points"]` for a different
package layout, an explicit Django AppConfig or additional entry-point groups:

```toml
[project.entry-points."angee.addons"]
"acme.notes" = "acme.notes.apps.NotesConfig"
```

The backend remaps files into `acme/notes/`, includes package data, and points an
editable install at the namespace root. Explicit `tool.hatch.build` settings win.
Keep repository ignore rules at its root; nested ignore files can shadow them.

Direct-reference dependencies are allowed by default. Set
`tool.hatch.metadata.allow-direct-references = false` to require Hatchling to
reject them. Requirements, versions, licenses and keywords remain authored native
metadata; the backend does not infer them or read `tool.angee`. Marketplace tags
use `project.keywords` and reach the wheel's standard `Keywords` metadata without
a category adapter. The authored `pyproject.toml` is preserved in every archive.

Installed consumers discover the addon through `importlib.metadata`. Catalogues
that also inspect source or packaged `pyproject.toml` must support the dynamic
declaration before migrating their addons; an omitted static entry-point table
does not mean that a built distribution has no addon entry point.

Build with `uv build --wheel`, or build a wheel from the self-contained sdist.
Run `uv run --extra dev pytest` for backend and distribution contracts.
