Metadata-Version: 2.4
Name: deps_installer
Version: 1.0.2
Summary: install all exe dependencies files in a directory - for pyinstaller
Author: Jair
Project-URL: Repository, https://github.com/Jair-F/deps_installer
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: pyuac>=0.0.3
Requires-Dist: pywin32>=311

# deps_installer

![Python](https://img.shields.io/badge/python-3.8%2B-blue)

Lightweight helper to bundle and run small installer scripts included with a
Python application (Windows only). The package looks for an `installers`
folder (default: `data/installers`) in the packaged resources and executes
each file found there.

Quick highlights:
- Programmatic: `install_deps(installer_folder='data/installers')`
- Platform: Windows only

## Quick Start

Programmatic call:

```python
from deps_installer import install_deps
install_deps()  # uses 'data/installers' by default
```

Example CLI (sample included):

```powershell
python src/example_use.py --install_deps
```

## Usage

- Function: `install_deps(installer_folder='data/installers')`.
- On non-Windows platforms the function prints a message and returns without
  running installers.

Notes:
- The function executes every file found in the provided folder using
  `subprocess.Popen`. Ensure files are executable and trusted.
- If you bundle with PyInstaller, include the `data` folder so installer
  files are available at runtime (see Packaging below).

## Packaging (PyInstaller)

Embed the `data` folder so installer files are available at runtime. Example:

```powershell
pyinstaller -F --clean --distpath dist ; \
  --add-binary data:data ; \
  --runtime-tmpdir tmp ; \
  --name installer_try src/example_use.py
```

This places your `data` contents inside the executable runtime so
`install_deps()` can find `data/installers`.

## Troubleshooting & Notes

- Missing folder: `os.listdir` will raise if the folder does not exist. Create
  `data/installers` (or pass a different folder) before packaging.
- Interactive installers: test installers manually—automated installs should
  avoid blocking prompts.
- Admin rights: if installers require elevation, re-launch your app as admin
  (see `pyuac` usage in `src/example_use.py`).

## Security

This project executes files shipped with the package. Only include files
from trusted sources. For production use consider:
- restricting executable extensions (e.g. `.exe`, `.msi`, `.bat`)
- validating file hashes or signatures before execution
