2020-07-24 02:20:30 -04:00
|
|
|
# Poetry
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2021-07-20 16:19:01 -04:00
|
|
|
## Add dependencies automatically
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-09-30 20:49:35 -04:00
|
|
|
Add your dependencies in file [requirements.txt](../requirements.txt) and run script
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-24 02:20:30 -04:00
|
|
|
```bash
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/poetry/poetry_update.py
|
2020-07-24 02:20:30 -04:00
|
|
|
```
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-09-30 20:49:35 -04:00
|
|
|
This will search all `requirements.txt` files and update `pyproject.toml` and it will update poetry
|
2020-07-24 02:20:30 -04:00
|
|
|
|
2021-06-27 00:22:51 -04:00
|
|
|
Priority dependencies in ./requirements.txt, after it's ./odoo/requirements.txt, after it's highest version values.
|
|
|
|
|
|
2020-12-11 03:46:56 -05:00
|
|
|
TODO add option to only add missing dependencies and ignore update.
|
|
|
|
|
|
2021-07-20 16:19:01 -04:00
|
|
|
## Add dependencies manually
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-09-30 20:49:35 -04:00
|
|
|
The automatic script will erase this dependency, but you can add it for your local test.
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-24 02:20:30 -04:00
|
|
|
```bash
|
|
|
|
|
poetry add PYTHON_MODULE
|
|
|
|
|
```
|
2022-03-31 20:17:36 -04:00
|
|
|
|
|
|
|
|
## Error `relative path can't be expressed as a file URI`
|
|
|
|
|
|
|
|
|
|
If you got this error `relative path can't be expressed as a file URI` when executing poetry, delete directory
|
|
|
|
|
artifacts: `rm -rf artifacts/` and rerun the update.
|
2022-12-21 00:22:20 -05:00
|
|
|
|
|
|
|
|
## Upgrade Poetry
|
|
|
|
|
|
2023-01-02 20:33:57 -05:00
|
|
|
Change version in file `./script/install/install_locally.sh` into constant `POETRY_VERSION`.
|
2022-12-21 00:22:20 -05:00
|
|
|
|
|
|
|
|
Erase directory `~/.poetry` and `./get-poetry.py`.
|
|
|
|
|
|
2023-01-02 20:33:57 -05:00
|
|
|
Run installation script for OS, check `./script/install/install_locally.sh`.
|