-
Notifications
You must be signed in to change notification settings - Fork 7
Config
Zoran Simic edited this page Jul 13, 2021
·
1 revision
Pickley does everything relative to its <base> folder.
The <base> folder is:
- the folder where pickley is installed in normal operation
-
.venv/rootwhen running from a dev venv (including in debugger) -
--buildfolder when runningpickley package - can be overridden by env var
PICKLEY_ROOT(unusual, for testing)
A subset of the configuration is referred to as settings, these are just 3 values
that the user can easily override via corresponding CLI flags:
-
delivery: delivery method to use (one of:symlinkorwrap, descendant of classDeliveryMethod) -
index: pypi index to use -
python: desired python version to use, default: same python as pickley is installed with
Pickley loads a configuration file (if present) from:
-
--configcommand line argument -
<base>/.pickley/config.jsonby default
More configuration files can be included, via an include directive.
First definition found wins. Search order is:
- Command line flags (each Settings above has a corresponding CLI flag)
- configuration file's
pinnedsection - configuration file's top-level definition
- hardcoded default
For example, which delivery method should be used to install <installable>?:
- if
--deliveryprovided -> it wins, we use that -
pinned/<installable>/deliveryentry in configuration, if there is one -
deliverytop-level definition in configuration, if there is one - finally, use hardcoded default if none of the above found
Configuration files are json as their name implies, here's an example:
{
"include": "foo.json",
"bundle": {
"dev": "tox twine"
},
"pinned": {
"mgit": "1.1.2",
"tox": {
"delivery": "wrap",
"index": "....",
"python": "3.9",
"version": "3.2.1"
}
},
"index": "https://pypi-mirror.mycompany.net/pypi",
"delivery": "wrap",
"pyenv": "~/.pyenv",
"install_timeout": 1800,
"version_check_delay": 300
}
The above means:
- Include a secondary configuration file (relative paths are relative to configuration file stating the
include) - Define a "bundle" called
dev(convenience for installing multiple things at once viapickley install bundle:dev) - Pin version to use for
mgit, pin every possible setting fortox - Use a custom pypi index
- Use the
wrapdelivery mode by default (which will create a self-upgrading wrapper, checking for new versions and auto-installing them every time you invoke corresponding command) - Look for pyenv installations in
~/.pyenv - ``install_timeout``how long to wait (in seconds) before considering an installation as failed
-
version_check_delayhow frequently to check (in seconds) for new latest versions on pypi