Skip to content

Commit a403f8b

Browse files
committed
docs(hacking): document MOUNT var for local Python package overrides
1 parent d4ac753 commit a403f8b

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

HACKING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@ You can use the `./run` script to use Node modules from a local folder on a one-
8282
./run --node-module $HOME/projects/vanilla-framework watch # Build CSS dynamically, using a local version of vanilla-framework
8383
```
8484

85+
### Overriding Python packages
86+
87+
If you're maintaining one of the Canonical web team's Python packages (e.g. `canonicalwebteam.flask-base`, `canonicalwebteam.templatefinder`, `canonicalwebteam.blog`, `canonicalwebteam.search`) and want to test local changes against ubuntu.com without publishing a release, pass `MOUNT=<path>` to any Python-running task. The `start`, `build`, `test-python`, and `lint-python` tasks prepend that path to `PYTHONPATH`, so Python loads modules from your local checkout instead of the installed version:
88+
89+
```bash
90+
task start MOUNT=$HOME/projects/canonicalwebteam.flask-base
91+
task test-python MOUNT=$HOME/projects/canonicalwebteam.blog
92+
```
93+
94+
`MOUNT` is opt-in — leave it unset for normal runs. CI never sets it.
95+
8596
## Making changes to the site
8697

8798
Guides for making changes to the ubuntu.com codebase.

0 commit comments

Comments
 (0)