You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Create the sample config file
Copy the sample invoice templates to their proper location (failing or prompting if this action would overwrite an existing file)
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).
The text was updated successfully, but these errors were encountered:
TL;DR: I'm proposing a
billwarrior install
command to copy config files into the proper locations instead of keeping this logic insetup.py
.Currently,
billwarrior
writes some config files viasetup.py
. This is a bit tricky, because according to the Python docs thedata_files
key is not meant for arbitrary installation locations (see below).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 commandbillwarrior install
, which would do the following: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).The text was updated successfully, but these errors were encountered: