Skip to content

Make Pillow a required dependency - #103

Merged
AdamXweb merged 1 commit into
mainfrom
feat/require-pillow
Nov 10, 2026
Merged

AdamXweb merged 1 commit into
mainfrom
feat/require-pillow

Conversation

@adamXbot

Copy link
Copy Markdown
Collaborator

What changed

pipx install fxcss is now the whole install. Pillow moves from the images extra to a required dependency, so catalogue, compare, check, tweaks and upgrade --compare work without a second step.

  • fxcss[images] stays valid as an empty extra, so existing install commands, scripts and generated workflows keep working. Pinned install lines and workflow templates are unchanged, because older releases still need the extra.
  • The missing-Pillow message and lazy imports stay. fxcss can still run without Pillow from an uninstalled checkout or after pip install --no-deps.
  • The README leads with the shorter install and explains what Linux CPUs with no prebuilt Pillow need.
  • scripts/package_smoke.py now checks that a normal install brings Pillow and that the images extra is still declared.

Behaviour changes

  • Every install now includes Pillow, about a 6.5 MB download and 22 MB installed.
  • Installs that used to leave Pillow out now capture the panel views in fxcss shot: 34 images instead of 26, and about 27 seconds longer in the run below. This matches what [images] installs already do.
  • On Linux with 32-bit x86, RISC-V, ppc64le or s390x, or glibc older than 2.27, pip has to compile Pillow. Without a compiler and image headers the install now fails, where a bare install used to work. The README lists the packages needed and a --no-deps workaround.

Testing

Run against wheels built from this branch and from unchanged main, in Linux arm64 containers.

Scenario Result
Unit suite, Python 3.12 802 tests pass, 13 skipped
scripts/package_smoke.py, Python 3.9 and 3.14 Pass, including upgrade from 0.25.0
Install and compare on Python 3.9 to 3.15 Pass, using prebuilt Pillow
Python 3.9 with pip 20.3.4 Pass
Distro pipx on Ubuntu 24.04 and 26.04, Debian 12 and 13, Alpine 3.24 Pass
fxcss[images] Installs with no warning
pipx inject fxcss pillow on an install that already has it Succeeds
fxcss try on a local folder and on AdamXweb/WhiteSurFirefoxThemeMacOS, Firefox 153 ESR under Xvfb Same as unchanged main
fxcss shot and compare, Firefox ESR under Xvfb Pass, with the 8 extra panel images noted above
fxcss shot with no display Same error as unchanged main
pipx upgrade from 0.25.0: bare, [images], injected Pillow Pass, and Pillow is added automatically
Pinned fxcss[images]== 0.10.0, 0.16.2, 0.22.0, 0.25.0 with a newer fxcss available Stay on the pinned version, and all four render and compare a theme in Firefox
v0.8.0-era git+ install from generated workflows Installs the pinned version
Source checkout at v0.25.0, editable with [images] Pass
Bare editable checkout pulled without reinstalling Image commands show the Pillow message, and reinstalling adds Pillow
No prebuilt Pillow, no compiler (simulated with --no-binary pillow) Install fails, as documented
No prebuilt Pillow, compiler but no image headers Install fails, as documented
No prebuilt Pillow, the README's package list Install and compare pass
No prebuilt Pillow, venv with pip install --no-deps Works, and image commands show the Pillow message
No prebuilt Pillow, pipx with --no-deps Fails with a pipx internal error, as the README notes

Not run: x86_64 (pip resolves a prebuilt Pillow for it, and this PR's CI runs it), real hardware for the CPUs without prebuilt Pillow, NixOS, a Wayland desktop, and older generated workflows on GitHub Actions itself (their install, render and compare commands were run directly).

Existing issue, not changed here: a Pillow compiled without FreeType makes compare exit with a traceback. [images] installs do the same today, and the README's package list includes FreeType.

How to test

python3 -m pip install -e .
python3 -m unittest discover -s tests -v
python3 -m pip install build
python3 -m build
python3 scripts/package_smoke.py --dist dist

🤖 Generated with Claude Code

`pipx install fxcss` now installs everything the image commands need. The `images` extra stays, empty, so `fxcss[images]` commands, scripts and generated workflows keep working.

fxcss can still run without Pillow from an uninstalled checkout or after `pip install --no-deps`, so the missing-Pillow message and lazy imports stay. The README covers Linux CPUs with no prebuilt Pillow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AdamXweb
AdamXweb merged commit cbab804 into main Nov 10, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants