# distromate-flet

Build Python desktop apps through `distromate` with Flet's `flet pack` workflow.

## Install

```bash
pip install distromate-flet
```

Install the DistroMate CLI separately. This package only provides the builder plugin entrypoint.

## Usage

Point `distromate.yaml` at the builder plugin and put Flet pack arguments in `source.options.fletArgs`:

```yaml
source:
  type: adapter
  plugin: flet
  options:
    projectDir: .
    fletArgs:
      - --name
      - demo-app
      - --product-name
      - Demo App
      - app.py

publish:
  appId: "70253487"
  channel: stable

package:
  publisher: Demo Inc.
```

Run DistroMate directly:

```bash
distromate package -v 1.2.3
distromate publish -v 1.2.3
```

Installing `distromate-flet` adds the `dm-plugin-flet` command. `distromate` no longer installs plugins for you.

## Behavior

- runs `python -m flet pack ...` first
- derives `productName`, `package.name`, `package.description`, `source.root`, `source.executable`, icon, and publisher from Flet pack arguments
- merges generic DistroMate fields with values resolved from `source.options`
- returns prepared native source metadata plus inferred DistroMate defaults over JSON/stdio so `distromate` continues the package or publish flow

## Notes

- `source.options.fletArgs` is the main pass-through for Flet pack arguments
- if `version` is not set in `source.options`, the plugin falls back to `--product-version` and then `pyproject.toml -> project.version`
