Create a quick install script #197

Open
opened 2026-06-04 21:10:57 -04:00 by didericis · 0 comments
Owner

Installation & Distribution Recommendation

Preferred Approach

Use a proper Python package as the primary distribution artifact,
while keeping install.sh as a convenience bootstrapper.

User Installation Paths

./install.sh

or for Python-native users:

pipx install your-project
uv tool install your-project
pip install --user your-project

Contributor Workflow

git clone ...
python3 -m your_project

Why Package Instead of "Clone and Run"

Advantages:

  • Standard Python ecosystem tooling.
  • Clear separation between source checkout and installed application.
  • Easier upgrades and version pinning.
  • Better fit for security-conscious developers.
  • Supports pip, pipx, and uv users without additional work.

Installer Responsibilities

install.sh should:

  1. Verify Python version.
  2. Verify Docker availability.
  3. Install the package using the user's preferred method.
  4. Create configuration and plugin directories.
  5. Run a diagnostic command (yourapp doctor).

It should avoid silently installing Docker.

Python Runtime

Because the project is stdlib-only:

  • Do not require uv.
  • Do not bundle Python by default.
  • Require a supported host Python version (for example, Python 3.11+).

Bundling Python only becomes compelling if:

  • Exact runtime reproducibility is required.
  • Plugins depend on a specific Python version.
  • You want a standalone binary distribution.

Plugin Architecture

Prefer isolated execution:

Best:      Containerized plugins
Acceptable: Per-plugin virtual environments
Avoid:     Arbitrary host-process plugins by default

Suggested plugin layout:

~/.local/share/yourapp/plugins/

Example manifest:

name = "example"
version = "0.1.0"
entry = "plugin:main"
permissions = ["repo:read"]
runtime = "container"

Minimal pyproject.toml

[project]
name = "your-project"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = []

[project.scripts]
yourapp = "your_project.cli:main"

Final Recommendation

Package the application properly and publish release artifacts.

Keep install.sh as a thin convenience wrapper that validates
prerequisites and installs the package.

This provides a good experience for both:

  • Normal users who want a simple install process.
  • Experienced developers who prefer standard Python tooling.
# Installation & Distribution Recommendation ## Preferred Approach Use a **proper Python package** as the primary distribution artifact, while keeping `install.sh` as a convenience bootstrapper. ### User Installation Paths ``` bash ./install.sh ``` or for Python-native users: ``` bash pipx install your-project uv tool install your-project pip install --user your-project ``` ### Contributor Workflow ``` bash git clone ... python3 -m your_project ``` ## Why Package Instead of "Clone and Run" Advantages: - Standard Python ecosystem tooling. - Clear separation between source checkout and installed application. - Easier upgrades and version pinning. - Better fit for security-conscious developers. - Supports pip, pipx, and uv users without additional work. ## Installer Responsibilities `install.sh` should: 1. Verify Python version. 2. Verify Docker availability. 3. Install the package using the user's preferred method. 4. Create configuration and plugin directories. 5. Run a diagnostic command (`yourapp doctor`). It should avoid silently installing Docker. ## Python Runtime Because the project is stdlib-only: - Do not require `uv`. - Do not bundle Python by default. - Require a supported host Python version (for example, Python 3.11+). Bundling Python only becomes compelling if: - Exact runtime reproducibility is required. - Plugins depend on a specific Python version. - You want a standalone binary distribution. ## Plugin Architecture Prefer isolated execution: ``` text Best: Containerized plugins Acceptable: Per-plugin virtual environments Avoid: Arbitrary host-process plugins by default ``` Suggested plugin layout: ``` text ~/.local/share/yourapp/plugins/ ``` Example manifest: ``` toml name = "example" version = "0.1.0" entry = "plugin:main" permissions = ["repo:read"] runtime = "container" ``` ## Minimal pyproject.toml ``` toml [project] name = "your-project" version = "0.1.0" requires-python = ">=3.11" dependencies = [] [project.scripts] yourapp = "your_project.cli:main" ``` ## Final Recommendation Package the application properly and publish release artifacts. Keep `install.sh` as a thin convenience wrapper that validates prerequisites and installs the package. This provides a good experience for both: - Normal users who want a simple install process. - Experienced developers who prefer standard Python tooling.
didericis added the Kind/Feature label 2026-06-04 21:12:08 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: didericis/bot-bottle#197