Skip to content
This repository was archived by the owner on Jun 3, 2026. It is now read-only.
This repository was archived by the owner on Jun 3, 2026. It is now read-only.

RFC: billwarrior install command #11

Description

@jonafato

TL;DR: I'm proposing a billwarrior install command to copy config files into the proper locations instead of keeping this logic in setup.py.

Currently, billwarrior writes some config files via setup.py. This is a bit tricky, because according to the Python docs the data_files key is not meant for arbitrary installation locations (see below).

The directory should be a relative path. It is interpreted relative to the installation prefix (Python’s sys.prefix for system installations; site.USER_BASE for user installations). Distutils allows directory to be an absolute installation path, but this is discouraged since it is incompatible with the wheel packaging format.

Because of this limitation, relying on setup.py for putting files in the right place on the system limits distribution options. I'm opening this issue to suggest a new CLI command billwarrior install, which would do the following:

  1. Create the sample config file
  2. Copy the sample invoice templates to their proper location (failing or prompting if this action would overwrite an existing file)
  3. Install the billwarrior extension to the proper path by detecting the user's extensions path via timew extensions (this is detailed as a TODO in the readme, and I think it makes sense to include here)

I'm happy to put this together if you're open to the change. I wanted to open an issue first since it's a change to the UI as well as a breaking change to the existing billwarrior CLI script (which would need to get a new command for the existing behavior to accommodate this change).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions