odoo-devops-tools 1.0.0__tar.gz → 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {odoo_devops_tools-1.0.0 → odoo_devops_tools-1.0.1}/PKG-INFO +42 -32
- {odoo_devops_tools-1.0.0 → odoo_devops_tools-1.0.1}/README.md +41 -31
- odoo_devops_tools-1.0.1/odoo_devops_tools/__init__.py +1 -0
- {odoo_devops_tools-1.0.0 → odoo_devops_tools-1.0.1}/odoo_devops_tools/env.py +20 -20
- {odoo_devops_tools-1.0.0 → odoo_devops_tools-1.0.1}/odoo_devops_tools.egg-info/PKG-INFO +42 -32
- odoo_devops_tools-1.0.1/odoo_devops_tools.egg-info/entry_points.txt +2 -0
- {odoo_devops_tools-1.0.0 → odoo_devops_tools-1.0.1}/pyproject.toml +2 -3
- odoo_devops_tools-1.0.0/odoo_devops_tools/__init__.py +0 -1
- odoo_devops_tools-1.0.0/odoo_devops_tools.egg-info/entry_points.txt +0 -3
- {odoo_devops_tools-1.0.0 → odoo_devops_tools-1.0.1}/LICENSE +0 -0
- {odoo_devops_tools-1.0.0 → odoo_devops_tools-1.0.1}/odoo_devops_tools.egg-info/SOURCES.txt +0 -0
- {odoo_devops_tools-1.0.0 → odoo_devops_tools-1.0.1}/odoo_devops_tools.egg-info/dependency_links.txt +0 -0
- {odoo_devops_tools-1.0.0 → odoo_devops_tools-1.0.1}/odoo_devops_tools.egg-info/top_level.txt +0 -0
- {odoo_devops_tools-1.0.0 → odoo_devops_tools-1.0.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: odoo-devops-tools
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: A set of DevOps tools for Odoo deployments and local dev.
|
|
5
5
|
Author: Roman Lacko
|
|
6
6
|
License-Expression: MIT
|
|
@@ -38,7 +38,17 @@ Install with pip:
|
|
|
38
38
|
pip install odoo-devops-tools
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Or install with uv:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
uv tool install odoo-devops-tools
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
odt-env --help
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Command: `odt-env`
|
|
42
52
|
|
|
43
53
|
Provision and sync a reproducible Odoo workspace from an INI configuration file.
|
|
44
54
|
|
|
@@ -52,56 +62,56 @@ Provision and sync a reproducible Odoo workspace from an INI configuration file.
|
|
|
52
62
|
Full **default** behavior (clone repositories, create venv, generate config and helper scripts):
|
|
53
63
|
|
|
54
64
|
```bash
|
|
55
|
-
|
|
65
|
+
odt-env /path/to/ROOT/odoo-project.ini --sync-all --create-venv
|
|
56
66
|
```
|
|
57
67
|
|
|
58
68
|
By default, `ROOT` is the directory containing the INI file. You can override where the workspace is created with `--root` (must point to an existing directory):
|
|
59
69
|
|
|
60
70
|
```bash
|
|
61
|
-
|
|
71
|
+
odt-env /path/to/odoo-project.ini --sync-all --create-venv --root /path/to/NEW-ROOT
|
|
62
72
|
```
|
|
63
73
|
|
|
64
74
|
If you want to **build** the workspace in one location but have the generated configs/scripts refer to a different **deployment root**, use `--dest-root`. This path does **not** need to exist on the build machine (it may only exist on the target host):
|
|
65
75
|
|
|
66
76
|
```bash
|
|
67
|
-
|
|
77
|
+
odt-env /path/to/odoo-project.ini --sync-all --create-wheelhouse --root /tmp/build-root --dest-root /srv/odoo/myproject
|
|
68
78
|
```
|
|
69
79
|
|
|
70
80
|
Sync without venv provisioning:
|
|
71
81
|
|
|
72
82
|
```bash
|
|
73
|
-
|
|
83
|
+
odt-env /path/to/ROOT/odoo-project.ini --sync-all
|
|
74
84
|
```
|
|
75
85
|
|
|
76
86
|
Build wheelhouse without venv provisioning:
|
|
77
87
|
|
|
78
88
|
```bash
|
|
79
|
-
|
|
89
|
+
odt-env /path/to/ROOT/odoo-project.ini --sync-all --create-wheelhouse
|
|
80
90
|
```
|
|
81
91
|
|
|
82
92
|
Offline venv provisioning from an existing wheelhouse:
|
|
83
93
|
|
|
84
94
|
```bash
|
|
85
|
-
|
|
95
|
+
odt-env /path/to/ROOT/odoo-project.ini --create-venv --reuse-wheelhouse
|
|
86
96
|
```
|
|
87
97
|
|
|
88
98
|
Hard rebuild of the venv:
|
|
89
99
|
|
|
90
100
|
```bash
|
|
91
|
-
|
|
101
|
+
odt-env /path/to/ROOT/odoo-project.ini --sync-all --rebuild-venv
|
|
92
102
|
```
|
|
93
103
|
|
|
94
|
-
If no options are specified,
|
|
104
|
+
If no options are specified, odt-env only regenerates config and helper scripts:
|
|
95
105
|
|
|
96
106
|
```bash
|
|
97
|
-
|
|
107
|
+
odt-env /path/to/ROOT/odoo-project.ini
|
|
98
108
|
```
|
|
99
109
|
|
|
100
|
-
### What
|
|
110
|
+
### What odt-env creates (directory layout)
|
|
101
111
|
|
|
102
112
|
`ROOT` is the directory containing `odoo-project.ini` (or the path passed via `--root`).
|
|
103
113
|
|
|
104
|
-
If you pass `--dest-root`,
|
|
114
|
+
If you pass `--dest-root`, odt-env still creates files under `ROOT`, but **paths embedded inside generated files** are based on `DEST_ROOT`.
|
|
105
115
|
|
|
106
116
|
- `ROOT/odoo/` - Odoo repository
|
|
107
117
|
- `ROOT/odoo-addons/<name>/` - addon repositories
|
|
@@ -124,7 +134,7 @@ This configuration creates a ready-to-run Odoo 18.0 development workspace, inclu
|
|
|
124
134
|
```ini
|
|
125
135
|
[virtualenv]
|
|
126
136
|
python_version = 3.11
|
|
127
|
-
# Optional (default: true): when false,
|
|
137
|
+
# Optional (default: true): when false, odt-env will NOT install a managed CPython via `uv python install`.
|
|
128
138
|
# Instead it will rely on an existing system Python that matches `python_version`.
|
|
129
139
|
# managed_python = false
|
|
130
140
|
build_constraints =
|
|
@@ -159,7 +169,7 @@ max_cron_threads = 0
|
|
|
159
169
|
|
|
160
170
|
### Using multiple configuration files with inheritance
|
|
161
171
|
|
|
162
|
-
|
|
172
|
+
odt-env supports a lightweight include mechanism so you can split configuration across multiple INI files (for example a shared `base.ini` plus a local override file).
|
|
163
173
|
|
|
164
174
|
Notes:
|
|
165
175
|
|
|
@@ -220,9 +230,9 @@ db_name = sample_odoo18_test
|
|
|
220
230
|
|
|
221
231
|
### Configuration variables & interpolation
|
|
222
232
|
|
|
223
|
-
|
|
233
|
+
odt-env uses Python's **ExtendedInterpolation**, so you can reference values via `${section:option}` (for example `${vars:branch}`).
|
|
224
234
|
|
|
225
|
-
In addition,
|
|
235
|
+
In addition, odt-env injects a set of **runtime variables** (workspace paths) into the INI `DEFAULT` scope, so they are available from *any* section in the INI file:
|
|
226
236
|
|
|
227
237
|
- `${ini_dir}` - directory containing the INI file
|
|
228
238
|
- `${root_dir}` - workspace root directory
|
|
@@ -236,7 +246,7 @@ In addition, odk-env injects a set of **runtime variables** (workspace paths) in
|
|
|
236
246
|
|
|
237
247
|
**Note on `--dest-root`:**
|
|
238
248
|
|
|
239
|
-
-
|
|
249
|
+
- odt-env always *builds* under `ROOT` (filesystem workspace).
|
|
240
250
|
- When `--dest-root` is provided, values like `${root_dir}`, `${odoo_dir}`, `${addons_dir}` etc. are evaluated against `DEST_ROOT` **for the `[config]` section** (used to render generated files like `odoo-server.conf`).
|
|
241
251
|
- Other sections (for example `[odoo]`, `[addons.*]`, `[virtualenv]`) continue to use the filesystem `ROOT` so build-time operations (git/venv/wheelhouse) are unaffected.
|
|
242
252
|
- `${ini_dir}` always points to the directory containing the entry INI on the build machine (needed for includes).
|
|
@@ -271,7 +281,7 @@ logfile = ${root_dir}/odoo-logs/${vars:project}.log
|
|
|
271
281
|
|
|
272
282
|
### Extending `addons_path`
|
|
273
283
|
|
|
274
|
-
|
|
284
|
+
odt-env always generates an `addons_path` for `odoo-server.conf` that includes:
|
|
275
285
|
|
|
276
286
|
- Odoo core addons directory (`ROOT/odoo/addons` and/or `ROOT/odoo/odoo/addons`)
|
|
277
287
|
- every synced addon repository (`ROOT/odoo-addons/<name>`)
|
|
@@ -295,7 +305,7 @@ addons_path =
|
|
|
295
305
|
|
|
296
306
|
### Shallow clones (`shallow_clone`)
|
|
297
307
|
|
|
298
|
-
By default,
|
|
308
|
+
By default, odt-env keeps repositories as **full clones** (all branches + tags + full history). For very large repositories (especially `odoo/odoo`) you can enable a **shallow, single-branch** workflow.
|
|
299
309
|
|
|
300
310
|
Where to set it:
|
|
301
311
|
|
|
@@ -322,7 +332,7 @@ Limitations / gotchas:
|
|
|
322
332
|
|
|
323
333
|
Switching back to a full clone:
|
|
324
334
|
|
|
325
|
-
Set `shallow_clone = false` (or remove it) and re-run a sync. If the repo is shallow and/or single-branch,
|
|
335
|
+
Set `shallow_clone = false` (or remove it) and re-run a sync. If the repo is shallow and/or single-branch, odt-env automatically converts it back to full history (unshallow) and widens the `origin` fetch refspec so a subsequent `fetch --all --tags` can pull all remote branches.
|
|
326
336
|
|
|
327
337
|
### Command-line Options
|
|
328
338
|
|
|
@@ -335,23 +345,23 @@ Set `shallow_clone = false` (or remove it) and re-run a sync. If the repo is sha
|
|
|
335
345
|
- `--rebuild-venv` - delete `ROOT/venv` and recreate it (implies `--create-venv`).
|
|
336
346
|
- `--reuse-wheelhouse` - reuse an existing `ROOT/wheelhouse/` and install offline only (skip lock/wheel build). Requires `--create-venv`.
|
|
337
347
|
- `--create-wheelhouse` - build/update the lock file + `ROOT/wheelhouse/` **without installing** project requirements into the venv.
|
|
338
|
-
(
|
|
348
|
+
(odt-env may create/update `ROOT/venv/` as a Python toolchain.)
|
|
339
349
|
- `--clear-pip-wheel-cache` - remove all items from the pip's wheel cache.
|
|
340
350
|
- `--no-configs` - don’t generate config files (e.g. `ROOT/odoo-configs/odoo-server.conf`).
|
|
341
351
|
- `--no-scripts` - don’t generate helper scripts under `ROOT/odoo-scripts/`.
|
|
342
352
|
- `--no-data-dir` - don’t create the Odoo data folder under `ROOT/odoo-data/` (or a custom path set via `[config] data_dir` in the INI file).
|
|
343
353
|
|
|
344
|
-
If no options are specified,
|
|
354
|
+
If no options are specified, odt-env only regenerates configs and helper scripts.
|
|
345
355
|
|
|
346
356
|
### Virtualenv
|
|
347
357
|
|
|
348
|
-
|
|
358
|
+
odt-env installs project Python dependencies into the venv only when you pass `--create-venv` (or `--rebuild-venv`).
|
|
349
359
|
You can (re)build the `ROOT/wheelhouse/` either as part of venv provisioning, or separately with `--create-wheelhouse`.
|
|
350
360
|
|
|
351
361
|
- The venv is created/used at: `ROOT/venv`
|
|
352
362
|
- Python version is taken from: `[virtualenv] python_version`
|
|
353
363
|
- venv + installs are done via: `uv venv` and `uv pip`
|
|
354
|
-
- If the requested Python version is not available on the machine and managed Python is enabled,
|
|
364
|
+
- If the requested Python version is not available on the machine and managed Python is enabled, odt-env installs it via `uv python install`.
|
|
355
365
|
- Requirements are resolved into a single lock file and installed into the venv from `ROOT/wheelhouse/` using offline mode (`--offline --no-index`).
|
|
356
366
|
|
|
357
367
|
#### Reusing an existing wheelhouse
|
|
@@ -359,7 +369,7 @@ You can (re)build the `ROOT/wheelhouse/` either as part of venv provisioning, or
|
|
|
359
369
|
If `ROOT/wheelhouse/` is already prepared (wheels + `all-requirements.lock.txt`), you can run (requires `--create-venv`):
|
|
360
370
|
|
|
361
371
|
```bash
|
|
362
|
-
|
|
372
|
+
odt-env /path/to/odoo-project.ini --create-venv --reuse-wheelhouse
|
|
363
373
|
```
|
|
364
374
|
|
|
365
375
|
This skips lock compilation and wheel building and does a strict offline install from the wheelhouse.
|
|
@@ -369,15 +379,15 @@ from the existing lock/wheels).
|
|
|
369
379
|
|
|
370
380
|
### Managed Python Install
|
|
371
381
|
|
|
372
|
-
By default,
|
|
382
|
+
By default, odt-env manages the requested CPython version for you using `uv`.
|
|
373
383
|
|
|
374
384
|
- Option: `[virtualenv] managed_python`
|
|
375
385
|
- Default: `true` (you can omit it)
|
|
376
386
|
|
|
377
387
|
Behavior:
|
|
378
388
|
|
|
379
|
-
- `managed_python = true` (default): when
|
|
380
|
-
- `managed_python = false`:
|
|
389
|
+
- `managed_python = true` (default): when odt-env needs to create `ROOT/venv/`, it ensures the requested `python_version` exists by running `uv python install`.
|
|
390
|
+
- `managed_python = false`: odt-env **skips** `uv python install` and relies on an already-installed system Python that matches `python_version`. If such Python is not available, venv creation will fail.
|
|
381
391
|
|
|
382
392
|
Example:
|
|
383
393
|
|
|
@@ -391,12 +401,12 @@ managed_python = false
|
|
|
391
401
|
### Safety / local changes policy
|
|
392
402
|
|
|
393
403
|
If any target repository (Odoo or an addon) contains local uncommitted changes
|
|
394
|
-
(including untracked files),
|
|
395
|
-
before running
|
|
404
|
+
(including untracked files), odt-env aborts. Commit/stash/clean your working tree
|
|
405
|
+
before running odt-env.
|
|
396
406
|
|
|
397
407
|
### Generated scripts
|
|
398
408
|
|
|
399
|
-
|
|
409
|
+
odt-env generates helper scripts into `ROOT/odoo-scripts/`. All scripts use the generated configuration file (`odoo-configs/odoo-server.conf`) and forward any additional arguments to the underlying command.
|
|
400
410
|
|
|
401
411
|
#### Linux/macOS
|
|
402
412
|
|
|
@@ -10,7 +10,17 @@ Install with pip:
|
|
|
10
10
|
pip install odoo-devops-tools
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Or install with uv:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
uv tool install odoo-devops-tools
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
odt-env --help
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Command: `odt-env`
|
|
14
24
|
|
|
15
25
|
Provision and sync a reproducible Odoo workspace from an INI configuration file.
|
|
16
26
|
|
|
@@ -24,56 +34,56 @@ Provision and sync a reproducible Odoo workspace from an INI configuration file.
|
|
|
24
34
|
Full **default** behavior (clone repositories, create venv, generate config and helper scripts):
|
|
25
35
|
|
|
26
36
|
```bash
|
|
27
|
-
|
|
37
|
+
odt-env /path/to/ROOT/odoo-project.ini --sync-all --create-venv
|
|
28
38
|
```
|
|
29
39
|
|
|
30
40
|
By default, `ROOT` is the directory containing the INI file. You can override where the workspace is created with `--root` (must point to an existing directory):
|
|
31
41
|
|
|
32
42
|
```bash
|
|
33
|
-
|
|
43
|
+
odt-env /path/to/odoo-project.ini --sync-all --create-venv --root /path/to/NEW-ROOT
|
|
34
44
|
```
|
|
35
45
|
|
|
36
46
|
If you want to **build** the workspace in one location but have the generated configs/scripts refer to a different **deployment root**, use `--dest-root`. This path does **not** need to exist on the build machine (it may only exist on the target host):
|
|
37
47
|
|
|
38
48
|
```bash
|
|
39
|
-
|
|
49
|
+
odt-env /path/to/odoo-project.ini --sync-all --create-wheelhouse --root /tmp/build-root --dest-root /srv/odoo/myproject
|
|
40
50
|
```
|
|
41
51
|
|
|
42
52
|
Sync without venv provisioning:
|
|
43
53
|
|
|
44
54
|
```bash
|
|
45
|
-
|
|
55
|
+
odt-env /path/to/ROOT/odoo-project.ini --sync-all
|
|
46
56
|
```
|
|
47
57
|
|
|
48
58
|
Build wheelhouse without venv provisioning:
|
|
49
59
|
|
|
50
60
|
```bash
|
|
51
|
-
|
|
61
|
+
odt-env /path/to/ROOT/odoo-project.ini --sync-all --create-wheelhouse
|
|
52
62
|
```
|
|
53
63
|
|
|
54
64
|
Offline venv provisioning from an existing wheelhouse:
|
|
55
65
|
|
|
56
66
|
```bash
|
|
57
|
-
|
|
67
|
+
odt-env /path/to/ROOT/odoo-project.ini --create-venv --reuse-wheelhouse
|
|
58
68
|
```
|
|
59
69
|
|
|
60
70
|
Hard rebuild of the venv:
|
|
61
71
|
|
|
62
72
|
```bash
|
|
63
|
-
|
|
73
|
+
odt-env /path/to/ROOT/odoo-project.ini --sync-all --rebuild-venv
|
|
64
74
|
```
|
|
65
75
|
|
|
66
|
-
If no options are specified,
|
|
76
|
+
If no options are specified, odt-env only regenerates config and helper scripts:
|
|
67
77
|
|
|
68
78
|
```bash
|
|
69
|
-
|
|
79
|
+
odt-env /path/to/ROOT/odoo-project.ini
|
|
70
80
|
```
|
|
71
81
|
|
|
72
|
-
### What
|
|
82
|
+
### What odt-env creates (directory layout)
|
|
73
83
|
|
|
74
84
|
`ROOT` is the directory containing `odoo-project.ini` (or the path passed via `--root`).
|
|
75
85
|
|
|
76
|
-
If you pass `--dest-root`,
|
|
86
|
+
If you pass `--dest-root`, odt-env still creates files under `ROOT`, but **paths embedded inside generated files** are based on `DEST_ROOT`.
|
|
77
87
|
|
|
78
88
|
- `ROOT/odoo/` - Odoo repository
|
|
79
89
|
- `ROOT/odoo-addons/<name>/` - addon repositories
|
|
@@ -96,7 +106,7 @@ This configuration creates a ready-to-run Odoo 18.0 development workspace, inclu
|
|
|
96
106
|
```ini
|
|
97
107
|
[virtualenv]
|
|
98
108
|
python_version = 3.11
|
|
99
|
-
# Optional (default: true): when false,
|
|
109
|
+
# Optional (default: true): when false, odt-env will NOT install a managed CPython via `uv python install`.
|
|
100
110
|
# Instead it will rely on an existing system Python that matches `python_version`.
|
|
101
111
|
# managed_python = false
|
|
102
112
|
build_constraints =
|
|
@@ -131,7 +141,7 @@ max_cron_threads = 0
|
|
|
131
141
|
|
|
132
142
|
### Using multiple configuration files with inheritance
|
|
133
143
|
|
|
134
|
-
|
|
144
|
+
odt-env supports a lightweight include mechanism so you can split configuration across multiple INI files (for example a shared `base.ini` plus a local override file).
|
|
135
145
|
|
|
136
146
|
Notes:
|
|
137
147
|
|
|
@@ -192,9 +202,9 @@ db_name = sample_odoo18_test
|
|
|
192
202
|
|
|
193
203
|
### Configuration variables & interpolation
|
|
194
204
|
|
|
195
|
-
|
|
205
|
+
odt-env uses Python's **ExtendedInterpolation**, so you can reference values via `${section:option}` (for example `${vars:branch}`).
|
|
196
206
|
|
|
197
|
-
In addition,
|
|
207
|
+
In addition, odt-env injects a set of **runtime variables** (workspace paths) into the INI `DEFAULT` scope, so they are available from *any* section in the INI file:
|
|
198
208
|
|
|
199
209
|
- `${ini_dir}` - directory containing the INI file
|
|
200
210
|
- `${root_dir}` - workspace root directory
|
|
@@ -208,7 +218,7 @@ In addition, odk-env injects a set of **runtime variables** (workspace paths) in
|
|
|
208
218
|
|
|
209
219
|
**Note on `--dest-root`:**
|
|
210
220
|
|
|
211
|
-
-
|
|
221
|
+
- odt-env always *builds* under `ROOT` (filesystem workspace).
|
|
212
222
|
- When `--dest-root` is provided, values like `${root_dir}`, `${odoo_dir}`, `${addons_dir}` etc. are evaluated against `DEST_ROOT` **for the `[config]` section** (used to render generated files like `odoo-server.conf`).
|
|
213
223
|
- Other sections (for example `[odoo]`, `[addons.*]`, `[virtualenv]`) continue to use the filesystem `ROOT` so build-time operations (git/venv/wheelhouse) are unaffected.
|
|
214
224
|
- `${ini_dir}` always points to the directory containing the entry INI on the build machine (needed for includes).
|
|
@@ -243,7 +253,7 @@ logfile = ${root_dir}/odoo-logs/${vars:project}.log
|
|
|
243
253
|
|
|
244
254
|
### Extending `addons_path`
|
|
245
255
|
|
|
246
|
-
|
|
256
|
+
odt-env always generates an `addons_path` for `odoo-server.conf` that includes:
|
|
247
257
|
|
|
248
258
|
- Odoo core addons directory (`ROOT/odoo/addons` and/or `ROOT/odoo/odoo/addons`)
|
|
249
259
|
- every synced addon repository (`ROOT/odoo-addons/<name>`)
|
|
@@ -267,7 +277,7 @@ addons_path =
|
|
|
267
277
|
|
|
268
278
|
### Shallow clones (`shallow_clone`)
|
|
269
279
|
|
|
270
|
-
By default,
|
|
280
|
+
By default, odt-env keeps repositories as **full clones** (all branches + tags + full history). For very large repositories (especially `odoo/odoo`) you can enable a **shallow, single-branch** workflow.
|
|
271
281
|
|
|
272
282
|
Where to set it:
|
|
273
283
|
|
|
@@ -294,7 +304,7 @@ Limitations / gotchas:
|
|
|
294
304
|
|
|
295
305
|
Switching back to a full clone:
|
|
296
306
|
|
|
297
|
-
Set `shallow_clone = false` (or remove it) and re-run a sync. If the repo is shallow and/or single-branch,
|
|
307
|
+
Set `shallow_clone = false` (or remove it) and re-run a sync. If the repo is shallow and/or single-branch, odt-env automatically converts it back to full history (unshallow) and widens the `origin` fetch refspec so a subsequent `fetch --all --tags` can pull all remote branches.
|
|
298
308
|
|
|
299
309
|
### Command-line Options
|
|
300
310
|
|
|
@@ -307,23 +317,23 @@ Set `shallow_clone = false` (or remove it) and re-run a sync. If the repo is sha
|
|
|
307
317
|
- `--rebuild-venv` - delete `ROOT/venv` and recreate it (implies `--create-venv`).
|
|
308
318
|
- `--reuse-wheelhouse` - reuse an existing `ROOT/wheelhouse/` and install offline only (skip lock/wheel build). Requires `--create-venv`.
|
|
309
319
|
- `--create-wheelhouse` - build/update the lock file + `ROOT/wheelhouse/` **without installing** project requirements into the venv.
|
|
310
|
-
(
|
|
320
|
+
(odt-env may create/update `ROOT/venv/` as a Python toolchain.)
|
|
311
321
|
- `--clear-pip-wheel-cache` - remove all items from the pip's wheel cache.
|
|
312
322
|
- `--no-configs` - don’t generate config files (e.g. `ROOT/odoo-configs/odoo-server.conf`).
|
|
313
323
|
- `--no-scripts` - don’t generate helper scripts under `ROOT/odoo-scripts/`.
|
|
314
324
|
- `--no-data-dir` - don’t create the Odoo data folder under `ROOT/odoo-data/` (or a custom path set via `[config] data_dir` in the INI file).
|
|
315
325
|
|
|
316
|
-
If no options are specified,
|
|
326
|
+
If no options are specified, odt-env only regenerates configs and helper scripts.
|
|
317
327
|
|
|
318
328
|
### Virtualenv
|
|
319
329
|
|
|
320
|
-
|
|
330
|
+
odt-env installs project Python dependencies into the venv only when you pass `--create-venv` (or `--rebuild-venv`).
|
|
321
331
|
You can (re)build the `ROOT/wheelhouse/` either as part of venv provisioning, or separately with `--create-wheelhouse`.
|
|
322
332
|
|
|
323
333
|
- The venv is created/used at: `ROOT/venv`
|
|
324
334
|
- Python version is taken from: `[virtualenv] python_version`
|
|
325
335
|
- venv + installs are done via: `uv venv` and `uv pip`
|
|
326
|
-
- If the requested Python version is not available on the machine and managed Python is enabled,
|
|
336
|
+
- If the requested Python version is not available on the machine and managed Python is enabled, odt-env installs it via `uv python install`.
|
|
327
337
|
- Requirements are resolved into a single lock file and installed into the venv from `ROOT/wheelhouse/` using offline mode (`--offline --no-index`).
|
|
328
338
|
|
|
329
339
|
#### Reusing an existing wheelhouse
|
|
@@ -331,7 +341,7 @@ You can (re)build the `ROOT/wheelhouse/` either as part of venv provisioning, or
|
|
|
331
341
|
If `ROOT/wheelhouse/` is already prepared (wheels + `all-requirements.lock.txt`), you can run (requires `--create-venv`):
|
|
332
342
|
|
|
333
343
|
```bash
|
|
334
|
-
|
|
344
|
+
odt-env /path/to/odoo-project.ini --create-venv --reuse-wheelhouse
|
|
335
345
|
```
|
|
336
346
|
|
|
337
347
|
This skips lock compilation and wheel building and does a strict offline install from the wheelhouse.
|
|
@@ -341,15 +351,15 @@ from the existing lock/wheels).
|
|
|
341
351
|
|
|
342
352
|
### Managed Python Install
|
|
343
353
|
|
|
344
|
-
By default,
|
|
354
|
+
By default, odt-env manages the requested CPython version for you using `uv`.
|
|
345
355
|
|
|
346
356
|
- Option: `[virtualenv] managed_python`
|
|
347
357
|
- Default: `true` (you can omit it)
|
|
348
358
|
|
|
349
359
|
Behavior:
|
|
350
360
|
|
|
351
|
-
- `managed_python = true` (default): when
|
|
352
|
-
- `managed_python = false`:
|
|
361
|
+
- `managed_python = true` (default): when odt-env needs to create `ROOT/venv/`, it ensures the requested `python_version` exists by running `uv python install`.
|
|
362
|
+
- `managed_python = false`: odt-env **skips** `uv python install` and relies on an already-installed system Python that matches `python_version`. If such Python is not available, venv creation will fail.
|
|
353
363
|
|
|
354
364
|
Example:
|
|
355
365
|
|
|
@@ -363,12 +373,12 @@ managed_python = false
|
|
|
363
373
|
### Safety / local changes policy
|
|
364
374
|
|
|
365
375
|
If any target repository (Odoo or an addon) contains local uncommitted changes
|
|
366
|
-
(including untracked files),
|
|
367
|
-
before running
|
|
376
|
+
(including untracked files), odt-env aborts. Commit/stash/clean your working tree
|
|
377
|
+
before running odt-env.
|
|
368
378
|
|
|
369
379
|
### Generated scripts
|
|
370
380
|
|
|
371
|
-
|
|
381
|
+
odt-env generates helper scripts into `ROOT/odoo-scripts/`. All scripts use the generated configuration file (`odoo-configs/odoo-server.conf`) and forward any additional arguments to the underlying command.
|
|
372
382
|
|
|
373
383
|
#### Linux/macOS
|
|
374
384
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
|
-
|
|
3
|
+
odt-env
|
|
4
4
|
|
|
5
5
|
Provision and sync a reproducible Odoo workspace from an INI configuration file
|
|
6
6
|
"""
|
|
@@ -23,7 +23,7 @@ from typing import Any, Dict, Iterable, Optional
|
|
|
23
23
|
|
|
24
24
|
from . import __version__
|
|
25
25
|
|
|
26
|
-
_logger = logging.getLogger("
|
|
26
|
+
_logger = logging.getLogger("odt-env")
|
|
27
27
|
|
|
28
28
|
_DEFAULT_REQUIREMENTS = [
|
|
29
29
|
"pip",
|
|
@@ -604,13 +604,13 @@ def _filter_requirements_file(
|
|
|
604
604
|
include_rel = parts[1].strip()
|
|
605
605
|
include_path = (req_path.parent / include_rel).resolve()
|
|
606
606
|
|
|
607
|
-
out_lines.append(f"#
|
|
607
|
+
out_lines.append(f"# odt-env: begin include {include_rel}")
|
|
608
608
|
if include_path in visited:
|
|
609
|
-
out_lines.append(f"#
|
|
609
|
+
out_lines.append(f"# odt-env: skipped recursive include {include_rel}")
|
|
610
610
|
else:
|
|
611
611
|
visited.add(include_path)
|
|
612
612
|
out_lines.extend(_filter_requirements_file(include_path, ignore_names, visited=visited))
|
|
613
|
-
out_lines.append(f"#
|
|
613
|
+
out_lines.append(f"# odt-env: end include {include_rel}")
|
|
614
614
|
continue
|
|
615
615
|
|
|
616
616
|
# Editable installs: -e <spec> / --editable <spec>
|
|
@@ -621,7 +621,7 @@ def _filter_requirements_file(
|
|
|
621
621
|
|
|
622
622
|
name = _extract_req_name_from_spec(spec)
|
|
623
623
|
if name and name in ignore_names:
|
|
624
|
-
out_lines.append(f"#
|
|
624
|
+
out_lines.append(f"# odt-env: skipped (ignored package '{name}'): {raw}")
|
|
625
625
|
continue
|
|
626
626
|
|
|
627
627
|
out_lines.append(raw)
|
|
@@ -641,7 +641,7 @@ def compile_all_requirements_lock(
|
|
|
641
641
|
) -> Path:
|
|
642
642
|
"""Compile a single lock file from multiple requirements sources using `uv pip compile`.
|
|
643
643
|
|
|
644
|
-
- Collects `base_requirements` (packages listed in INI +
|
|
644
|
+
- Collects `base_requirements` (packages listed in INI + odt-env defaults)
|
|
645
645
|
- Inlines and filters each requirements.txt (supports nested -r includes)
|
|
646
646
|
- Applies `requirements_ignore` consistently before compilation
|
|
647
647
|
- Writes:
|
|
@@ -678,13 +678,13 @@ def compile_all_requirements_lock(
|
|
|
678
678
|
req_lines.append("")
|
|
679
679
|
|
|
680
680
|
lines: list[str] = [
|
|
681
|
-
"# This file is generated by
|
|
682
|
-
"# Source: Odoo + addon repository requirements, plus [virtualenv].requirements and
|
|
681
|
+
"# This file is generated by odt-env (DO NOT EDIT).",
|
|
682
|
+
"# Source: Odoo + addon repository requirements, plus [virtualenv].requirements and odt-env defaults.",
|
|
683
683
|
"",
|
|
684
684
|
]
|
|
685
685
|
|
|
686
686
|
if base_requirements:
|
|
687
|
-
lines.append("# --- base requirements (from INI +
|
|
687
|
+
lines.append("# --- base requirements (from INI + odt-env defaults) ---")
|
|
688
688
|
for spec in base_requirements:
|
|
689
689
|
lines.append(spec)
|
|
690
690
|
lines.append("")
|
|
@@ -2419,7 +2419,7 @@ def sync_project(
|
|
|
2419
2419
|
# -----------------------------
|
|
2420
2420
|
|
|
2421
2421
|
def build_parser() -> argparse.ArgumentParser:
|
|
2422
|
-
epilog = """If no options are specified,
|
|
2422
|
+
epilog = """If no options are specified, odt-env only regenerates configs and helper scripts.
|
|
2423
2423
|
|
|
2424
2424
|
ROOT selection:
|
|
2425
2425
|
By default, ROOT is the directory containing the INI.
|
|
@@ -2427,16 +2427,16 @@ ROOT selection:
|
|
|
2427
2427
|
Use --dest-root to override the ROOT path embedded into generated configs/scripts (deployment root).
|
|
2428
2428
|
|
|
2429
2429
|
Examples:
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2430
|
+
odt-env /path/to/odoo-project.ini --sync-all --create-venv
|
|
2431
|
+
odt-env /path/to/odoo-project.ini --sync-all --create-wheelhouse
|
|
2432
|
+
odt-env /path/to/odoo-project.ini --sync-all --create-venv --root /path/to/workspace-root
|
|
2433
|
+
odt-env /path/to/odoo-project.ini --rebuild-venv --reuse-wheelhouse
|
|
2434
|
+
odt-env /path/to/odoo-project.ini --rebuild-venv --reuse-wheelhouse --root /path/to/workspace-root
|
|
2435
2435
|
"""
|
|
2436
2436
|
|
|
2437
2437
|
parser = argparse.ArgumentParser(
|
|
2438
|
-
prog="
|
|
2439
|
-
description=f"
|
|
2438
|
+
prog="odt-env",
|
|
2439
|
+
description=f"odt-env {__version__}",
|
|
2440
2440
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
2441
2441
|
epilog=epilog,
|
|
2442
2442
|
)
|
|
@@ -2444,7 +2444,7 @@ Examples:
|
|
|
2444
2444
|
parser.add_argument(
|
|
2445
2445
|
"--version",
|
|
2446
2446
|
action="version",
|
|
2447
|
-
version=f"
|
|
2447
|
+
version=f"odt-env {__version__}",
|
|
2448
2448
|
help="Show the program version and exit.",
|
|
2449
2449
|
)
|
|
2450
2450
|
|
|
@@ -2493,7 +2493,7 @@ Examples:
|
|
|
2493
2493
|
action="store_true",
|
|
2494
2494
|
help=(
|
|
2495
2495
|
"Enable virtualenv provisioning (create/update ROOT/venv + wheelhouse). "
|
|
2496
|
-
"Without this flag,
|
|
2496
|
+
"Without this flag, odt-env will not touch venv/wheelhouse."
|
|
2497
2497
|
),
|
|
2498
2498
|
)
|
|
2499
2499
|
parser.add_argument(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: odoo-devops-tools
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: A set of DevOps tools for Odoo deployments and local dev.
|
|
5
5
|
Author: Roman Lacko
|
|
6
6
|
License-Expression: MIT
|
|
@@ -38,7 +38,17 @@ Install with pip:
|
|
|
38
38
|
pip install odoo-devops-tools
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Or install with uv:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
uv tool install odoo-devops-tools
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
odt-env --help
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Command: `odt-env`
|
|
42
52
|
|
|
43
53
|
Provision and sync a reproducible Odoo workspace from an INI configuration file.
|
|
44
54
|
|
|
@@ -52,56 +62,56 @@ Provision and sync a reproducible Odoo workspace from an INI configuration file.
|
|
|
52
62
|
Full **default** behavior (clone repositories, create venv, generate config and helper scripts):
|
|
53
63
|
|
|
54
64
|
```bash
|
|
55
|
-
|
|
65
|
+
odt-env /path/to/ROOT/odoo-project.ini --sync-all --create-venv
|
|
56
66
|
```
|
|
57
67
|
|
|
58
68
|
By default, `ROOT` is the directory containing the INI file. You can override where the workspace is created with `--root` (must point to an existing directory):
|
|
59
69
|
|
|
60
70
|
```bash
|
|
61
|
-
|
|
71
|
+
odt-env /path/to/odoo-project.ini --sync-all --create-venv --root /path/to/NEW-ROOT
|
|
62
72
|
```
|
|
63
73
|
|
|
64
74
|
If you want to **build** the workspace in one location but have the generated configs/scripts refer to a different **deployment root**, use `--dest-root`. This path does **not** need to exist on the build machine (it may only exist on the target host):
|
|
65
75
|
|
|
66
76
|
```bash
|
|
67
|
-
|
|
77
|
+
odt-env /path/to/odoo-project.ini --sync-all --create-wheelhouse --root /tmp/build-root --dest-root /srv/odoo/myproject
|
|
68
78
|
```
|
|
69
79
|
|
|
70
80
|
Sync without venv provisioning:
|
|
71
81
|
|
|
72
82
|
```bash
|
|
73
|
-
|
|
83
|
+
odt-env /path/to/ROOT/odoo-project.ini --sync-all
|
|
74
84
|
```
|
|
75
85
|
|
|
76
86
|
Build wheelhouse without venv provisioning:
|
|
77
87
|
|
|
78
88
|
```bash
|
|
79
|
-
|
|
89
|
+
odt-env /path/to/ROOT/odoo-project.ini --sync-all --create-wheelhouse
|
|
80
90
|
```
|
|
81
91
|
|
|
82
92
|
Offline venv provisioning from an existing wheelhouse:
|
|
83
93
|
|
|
84
94
|
```bash
|
|
85
|
-
|
|
95
|
+
odt-env /path/to/ROOT/odoo-project.ini --create-venv --reuse-wheelhouse
|
|
86
96
|
```
|
|
87
97
|
|
|
88
98
|
Hard rebuild of the venv:
|
|
89
99
|
|
|
90
100
|
```bash
|
|
91
|
-
|
|
101
|
+
odt-env /path/to/ROOT/odoo-project.ini --sync-all --rebuild-venv
|
|
92
102
|
```
|
|
93
103
|
|
|
94
|
-
If no options are specified,
|
|
104
|
+
If no options are specified, odt-env only regenerates config and helper scripts:
|
|
95
105
|
|
|
96
106
|
```bash
|
|
97
|
-
|
|
107
|
+
odt-env /path/to/ROOT/odoo-project.ini
|
|
98
108
|
```
|
|
99
109
|
|
|
100
|
-
### What
|
|
110
|
+
### What odt-env creates (directory layout)
|
|
101
111
|
|
|
102
112
|
`ROOT` is the directory containing `odoo-project.ini` (or the path passed via `--root`).
|
|
103
113
|
|
|
104
|
-
If you pass `--dest-root`,
|
|
114
|
+
If you pass `--dest-root`, odt-env still creates files under `ROOT`, but **paths embedded inside generated files** are based on `DEST_ROOT`.
|
|
105
115
|
|
|
106
116
|
- `ROOT/odoo/` - Odoo repository
|
|
107
117
|
- `ROOT/odoo-addons/<name>/` - addon repositories
|
|
@@ -124,7 +134,7 @@ This configuration creates a ready-to-run Odoo 18.0 development workspace, inclu
|
|
|
124
134
|
```ini
|
|
125
135
|
[virtualenv]
|
|
126
136
|
python_version = 3.11
|
|
127
|
-
# Optional (default: true): when false,
|
|
137
|
+
# Optional (default: true): when false, odt-env will NOT install a managed CPython via `uv python install`.
|
|
128
138
|
# Instead it will rely on an existing system Python that matches `python_version`.
|
|
129
139
|
# managed_python = false
|
|
130
140
|
build_constraints =
|
|
@@ -159,7 +169,7 @@ max_cron_threads = 0
|
|
|
159
169
|
|
|
160
170
|
### Using multiple configuration files with inheritance
|
|
161
171
|
|
|
162
|
-
|
|
172
|
+
odt-env supports a lightweight include mechanism so you can split configuration across multiple INI files (for example a shared `base.ini` plus a local override file).
|
|
163
173
|
|
|
164
174
|
Notes:
|
|
165
175
|
|
|
@@ -220,9 +230,9 @@ db_name = sample_odoo18_test
|
|
|
220
230
|
|
|
221
231
|
### Configuration variables & interpolation
|
|
222
232
|
|
|
223
|
-
|
|
233
|
+
odt-env uses Python's **ExtendedInterpolation**, so you can reference values via `${section:option}` (for example `${vars:branch}`).
|
|
224
234
|
|
|
225
|
-
In addition,
|
|
235
|
+
In addition, odt-env injects a set of **runtime variables** (workspace paths) into the INI `DEFAULT` scope, so they are available from *any* section in the INI file:
|
|
226
236
|
|
|
227
237
|
- `${ini_dir}` - directory containing the INI file
|
|
228
238
|
- `${root_dir}` - workspace root directory
|
|
@@ -236,7 +246,7 @@ In addition, odk-env injects a set of **runtime variables** (workspace paths) in
|
|
|
236
246
|
|
|
237
247
|
**Note on `--dest-root`:**
|
|
238
248
|
|
|
239
|
-
-
|
|
249
|
+
- odt-env always *builds* under `ROOT` (filesystem workspace).
|
|
240
250
|
- When `--dest-root` is provided, values like `${root_dir}`, `${odoo_dir}`, `${addons_dir}` etc. are evaluated against `DEST_ROOT` **for the `[config]` section** (used to render generated files like `odoo-server.conf`).
|
|
241
251
|
- Other sections (for example `[odoo]`, `[addons.*]`, `[virtualenv]`) continue to use the filesystem `ROOT` so build-time operations (git/venv/wheelhouse) are unaffected.
|
|
242
252
|
- `${ini_dir}` always points to the directory containing the entry INI on the build machine (needed for includes).
|
|
@@ -271,7 +281,7 @@ logfile = ${root_dir}/odoo-logs/${vars:project}.log
|
|
|
271
281
|
|
|
272
282
|
### Extending `addons_path`
|
|
273
283
|
|
|
274
|
-
|
|
284
|
+
odt-env always generates an `addons_path` for `odoo-server.conf` that includes:
|
|
275
285
|
|
|
276
286
|
- Odoo core addons directory (`ROOT/odoo/addons` and/or `ROOT/odoo/odoo/addons`)
|
|
277
287
|
- every synced addon repository (`ROOT/odoo-addons/<name>`)
|
|
@@ -295,7 +305,7 @@ addons_path =
|
|
|
295
305
|
|
|
296
306
|
### Shallow clones (`shallow_clone`)
|
|
297
307
|
|
|
298
|
-
By default,
|
|
308
|
+
By default, odt-env keeps repositories as **full clones** (all branches + tags + full history). For very large repositories (especially `odoo/odoo`) you can enable a **shallow, single-branch** workflow.
|
|
299
309
|
|
|
300
310
|
Where to set it:
|
|
301
311
|
|
|
@@ -322,7 +332,7 @@ Limitations / gotchas:
|
|
|
322
332
|
|
|
323
333
|
Switching back to a full clone:
|
|
324
334
|
|
|
325
|
-
Set `shallow_clone = false` (or remove it) and re-run a sync. If the repo is shallow and/or single-branch,
|
|
335
|
+
Set `shallow_clone = false` (or remove it) and re-run a sync. If the repo is shallow and/or single-branch, odt-env automatically converts it back to full history (unshallow) and widens the `origin` fetch refspec so a subsequent `fetch --all --tags` can pull all remote branches.
|
|
326
336
|
|
|
327
337
|
### Command-line Options
|
|
328
338
|
|
|
@@ -335,23 +345,23 @@ Set `shallow_clone = false` (or remove it) and re-run a sync. If the repo is sha
|
|
|
335
345
|
- `--rebuild-venv` - delete `ROOT/venv` and recreate it (implies `--create-venv`).
|
|
336
346
|
- `--reuse-wheelhouse` - reuse an existing `ROOT/wheelhouse/` and install offline only (skip lock/wheel build). Requires `--create-venv`.
|
|
337
347
|
- `--create-wheelhouse` - build/update the lock file + `ROOT/wheelhouse/` **without installing** project requirements into the venv.
|
|
338
|
-
(
|
|
348
|
+
(odt-env may create/update `ROOT/venv/` as a Python toolchain.)
|
|
339
349
|
- `--clear-pip-wheel-cache` - remove all items from the pip's wheel cache.
|
|
340
350
|
- `--no-configs` - don’t generate config files (e.g. `ROOT/odoo-configs/odoo-server.conf`).
|
|
341
351
|
- `--no-scripts` - don’t generate helper scripts under `ROOT/odoo-scripts/`.
|
|
342
352
|
- `--no-data-dir` - don’t create the Odoo data folder under `ROOT/odoo-data/` (or a custom path set via `[config] data_dir` in the INI file).
|
|
343
353
|
|
|
344
|
-
If no options are specified,
|
|
354
|
+
If no options are specified, odt-env only regenerates configs and helper scripts.
|
|
345
355
|
|
|
346
356
|
### Virtualenv
|
|
347
357
|
|
|
348
|
-
|
|
358
|
+
odt-env installs project Python dependencies into the venv only when you pass `--create-venv` (or `--rebuild-venv`).
|
|
349
359
|
You can (re)build the `ROOT/wheelhouse/` either as part of venv provisioning, or separately with `--create-wheelhouse`.
|
|
350
360
|
|
|
351
361
|
- The venv is created/used at: `ROOT/venv`
|
|
352
362
|
- Python version is taken from: `[virtualenv] python_version`
|
|
353
363
|
- venv + installs are done via: `uv venv` and `uv pip`
|
|
354
|
-
- If the requested Python version is not available on the machine and managed Python is enabled,
|
|
364
|
+
- If the requested Python version is not available on the machine and managed Python is enabled, odt-env installs it via `uv python install`.
|
|
355
365
|
- Requirements are resolved into a single lock file and installed into the venv from `ROOT/wheelhouse/` using offline mode (`--offline --no-index`).
|
|
356
366
|
|
|
357
367
|
#### Reusing an existing wheelhouse
|
|
@@ -359,7 +369,7 @@ You can (re)build the `ROOT/wheelhouse/` either as part of venv provisioning, or
|
|
|
359
369
|
If `ROOT/wheelhouse/` is already prepared (wheels + `all-requirements.lock.txt`), you can run (requires `--create-venv`):
|
|
360
370
|
|
|
361
371
|
```bash
|
|
362
|
-
|
|
372
|
+
odt-env /path/to/odoo-project.ini --create-venv --reuse-wheelhouse
|
|
363
373
|
```
|
|
364
374
|
|
|
365
375
|
This skips lock compilation and wheel building and does a strict offline install from the wheelhouse.
|
|
@@ -369,15 +379,15 @@ from the existing lock/wheels).
|
|
|
369
379
|
|
|
370
380
|
### Managed Python Install
|
|
371
381
|
|
|
372
|
-
By default,
|
|
382
|
+
By default, odt-env manages the requested CPython version for you using `uv`.
|
|
373
383
|
|
|
374
384
|
- Option: `[virtualenv] managed_python`
|
|
375
385
|
- Default: `true` (you can omit it)
|
|
376
386
|
|
|
377
387
|
Behavior:
|
|
378
388
|
|
|
379
|
-
- `managed_python = true` (default): when
|
|
380
|
-
- `managed_python = false`:
|
|
389
|
+
- `managed_python = true` (default): when odt-env needs to create `ROOT/venv/`, it ensures the requested `python_version` exists by running `uv python install`.
|
|
390
|
+
- `managed_python = false`: odt-env **skips** `uv python install` and relies on an already-installed system Python that matches `python_version`. If such Python is not available, venv creation will fail.
|
|
381
391
|
|
|
382
392
|
Example:
|
|
383
393
|
|
|
@@ -391,12 +401,12 @@ managed_python = false
|
|
|
391
401
|
### Safety / local changes policy
|
|
392
402
|
|
|
393
403
|
If any target repository (Odoo or an addon) contains local uncommitted changes
|
|
394
|
-
(including untracked files),
|
|
395
|
-
before running
|
|
404
|
+
(including untracked files), odt-env aborts. Commit/stash/clean your working tree
|
|
405
|
+
before running odt-env.
|
|
396
406
|
|
|
397
407
|
### Generated scripts
|
|
398
408
|
|
|
399
|
-
|
|
409
|
+
odt-env generates helper scripts into `ROOT/odoo-scripts/`. All scripts use the generated configuration file (`odoo-configs/odoo-server.conf`) and forward any additional arguments to the underlying command.
|
|
400
410
|
|
|
401
411
|
#### Linux/macOS
|
|
402
412
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "odoo-devops-tools"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.1"
|
|
8
8
|
description = "A set of DevOps tools for Odoo deployments and local dev."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -37,8 +37,7 @@ Homepage = "https://github.com/lck/odoo-devops-tools"
|
|
|
37
37
|
Repository = "https://github.com/lck/odoo-devops-tools"
|
|
38
38
|
|
|
39
39
|
[project.scripts]
|
|
40
|
-
|
|
41
|
-
odoo-devops-tools-env = "odoo_devops_tools.env:main"
|
|
40
|
+
odt-env = "odoo_devops_tools.env:main"
|
|
42
41
|
|
|
43
42
|
[tool.setuptools.packages.find]
|
|
44
43
|
where = ["."]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.0.0"
|
|
File without changes
|
|
File without changes
|
{odoo_devops_tools-1.0.0 → odoo_devops_tools-1.0.1}/odoo_devops_tools.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{odoo_devops_tools-1.0.0 → odoo_devops_tools-1.0.1}/odoo_devops_tools.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|