Skip to content

Commit 7a18d59

Browse files
committed
docs: fix Linux deps and improve contribution setup instructions
- Replace obsolete libjpeg8-dev with libjpeg-dev (virtual metapackage, works on both Debian and Ubuntu); clarify that -dev headers are only needed when building Pillow from source, not for normal development - Rewrite contribution setup to use `hatch shell` (consistent with other openZIM repos like ted, warc2zim, youtube); clarify that all commands must be run from the local clone root; add note on what pre-commit install does Closes #152, Closes #153
1 parent 8c16fa6 commit 7a18d59

2 files changed

Lines changed: 30 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
- Add proper typing @overload to `zimscraperlib.image.optimize_xxx` methods (#273)
1818
- Backport wabac.JS change around rewriting: detect when JS is in 'strict' mode and avoid using 'arguments' (#286)
1919
- Fix installation from source, which missed wombatSetup.js (#287)
20+
- Fix obsolete `libjpeg8-dev` reference, replace with `libjpeg-dev` and clarify dev headers are only needed when building Pillow from source (#152)
21+
- Improve contribution setup instructions: use `hatch shell`, clarify commands must be run from local clone root (#153)
2022

2123
### Changed
2224

README.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,16 @@ brew install libmagic wget libtiff libjpeg webp little-cms2 ffmpeg gifsicle
4949

5050
## Linux
5151

52+
## Linux
53+
5254
```sh
53-
sudo apt install libmagic1 wget ffmpeg \
54-
libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
55+
# Minimal install (uses pre-built Pillow wheels — sufficient for most development)
56+
sudo apt install libmagic1 wget ffmpeg gifsicle
57+
58+
# Only needed if building Pillow from source
59+
sudo apt install libtiff5-dev libjpeg-dev libopenjp2-7-dev zlib1g-dev \
5560
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
56-
libharfbuzz-dev libfribidi-dev libxcb1-dev gifsicle
61+
libharfbuzz-dev libfribidi-dev libxcb1-dev
5762
```
5863

5964
## Alpine
@@ -68,11 +73,29 @@ This project adheres to openZIM's [Contribution Guidelines](https://github.com/o
6873

6974
This project has implemented openZIM's [Python bootstrap, conventions and policies](https://github.com/openzim/_python-bootstrap/docs/Policy.md) **v1.0.2**.
7075

76+
All instructions below must be run from the root of your local clone of this repository.
77+
78+
If you do not already have it on your system, install [hatch](https://hatch.pypa.io/latest/install/):
79+
7180
```shell
7281
pip install hatch
73-
pip install ".[dev]"
82+
```
83+
84+
Start a hatch shell — this will install all dependencies including dev in an isolated virtual environment:
85+
86+
```shell
87+
hatch shell
88+
```
89+
90+
Set up the pre-commit Git hook (runs linters automatically before each commit):
91+
92+
```shell
7493
pre-commit install
75-
# For tests
94+
```
95+
96+
Run tests with coverage:
97+
98+
```shell
7699
invoke coverage
77100
```
78101

0 commit comments

Comments
 (0)