Metadata-Version: 2.4
Name: pyinstaller-plus
Version: 0.1.24
Summary: PyInstaller wrapper that runs DistroMate packaging/publish after build
License-Expression: LicenseRef-Proprietary
Keywords: pyinstaller,distromate,packaging,installer,publish
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: distromate>=0.1.0
Requires-Dist: pyinstaller
Requires-Dist: tomli; python_version < "3.11"

# pyinstaller-plus

`pyinstaller-plus` is a PyInstaller-compatible wrapper that keeps your existing
PyInstaller workflow and then runs DistroMate packaging or publishing, with a
built-in login shortcut.
This README focuses on end-user packaging usage.

## Features

- Compatible with standard PyInstaller arguments
- Supports `login` mode (`distromate login`)
- Runs `distromate package` after a successful PyInstaller build
- Supports publish mode (`distromate publish`)
- Works on Windows, macOS, and Linux
- Depends on the `distromate` Python package instead of bundling its own CLI
- Supports `--appid` for `package` / `publish`
- Auto-creates `distromate.yaml` when missing and auto-syncs `appid` and package fields

## Install

```bash
pip install pyinstaller-plus
```

`distromate` will be installed automatically as a dependency.

## Quick Start

1. Log in to DistroMate:

```bash
pyinstaller-plus login
```

2. Optional: create a `distromate.yaml` (or `distromate.yml`) in your project root.
   If missing, `pyinstaller-plus` will create one with defaults.

3. Build and package:

```bash
pyinstaller-plus package -v 1.2.3 --appid com.example.app your.spec
```

4. Build and publish:

```bash
pyinstaller-plus publish -v 1.2.3 --appid com.example.app your.spec
```

## CLI Behavior

`pyinstaller-plus` executes one of these flows:

- `login`: resolve DistroMate CLI from the Python dependency or `PATH`, then run `distromate login`
- `package` / `publish`:

  1. Run `python -m PyInstaller ...`
  2. Resolve DistroMate CLI from:
     - installed `distromate` Python package
     - `PATH`
  3. Resolve release version from:
     - `package -v` / `package --version`
     - `publish -v` / `publish --version`
     - `pyproject.toml` -> `project.version`
  4. Resolve app id from:
     - `package --appid`
     - `publish --appid`
  5. Ensure and auto-update `distromate.yaml`/`distromate.yml` from CLI args and PyInstaller args/spec:
     - top-level `appid` (when `--appid` is provided)
     - top-level `name` (only auto-fill when missing)
     - `package.name`
     - `package.executable`
     - `package.target`
     - `package.icon` (from `--icon` or `EXE(icon=...)`)
     - `package.description` (from `--version-file` or `EXE(version=...)` -> `FileDescription`)
     - `package.publisher` (from `--version-file` or `EXE(version=...)` -> `CompanyName`)
  6. Run one of:
     - `distromate package -v <version>`
     - `distromate publish -v <version>`

### Commands

- `login`: run `distromate login`
- `package -v <version> [--appid <appid>]`: build with PyInstaller, then run `distromate package`
- `publish -v <version> [--appid <appid>]`: build with PyInstaller, then run `distromate publish`

Use `--` when you need to pass PyInstaller's own `--version` through the wrapper.

## Example `distromate.yml`

```yaml
appid: your_appid
name: MyApp

package:
  name: myapp
  description: My desktop app
  executable: dist/myapp.exe
  target: dist
  publisher: MyApp Publisher
  language: english
  files:
    - "**/*"
    - "!**/.git/**"
    - "!**/*.log"
    - "!temp/**"
    - "!**/__pycache__/**"
    - "!**/*.pyc"
  preservePaths:
    - config
    - data
```

`package.files` uses electron-builder-compatible glob patterns.
`package.ignores` is no longer kept in generated config.
