Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pygments: add pillow dependency #40760

Closed
wants to merge 27 commits into from

Conversation

markus1189
Copy link
Contributor

Without pillow, pygmentize fails to create a picture give a source
file with the error:

*** Error while highlighting:
PilNotAvailable: Python Imaging Library is required for this formatter
   (file "/nix/store/rd48ryf5yw14c0f4wa30m079lyvxjd4m-python2.7-Pygments-2.2.0/lib/python2.7/site-packages/pygments/formatters/img.py", line 336, in __init__)
*** If this is a bug you want to report, please rerun with -v.

The only remaining issue is that the default font may not be installed
on your system, but you can give it a different font via:

pygmentize -Ofont_name="Source Sans Pro" -o file.png file.yml
Motivation for this change

pygmentize was not able to generate pictures because of a missing library

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

jarjee and others added 27 commits May 9, 2018 12:14
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/gdal/versions.

These checks were done:

- built on NixOS
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/.gdal2tiles.py-wrapped -h’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/.gdal2tiles.py-wrapped --help’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/gdal2tiles.py -h’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/gdal2tiles.py --help’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/.gdalident.py-wrapped -h’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/.gdalident.py-wrapped --help’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/.gdalident.py-wrapped help’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/gdalident.py -h’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/gdalident.py --help’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/gdalident.py help’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/.mkgraticule.py-wrapped help’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/mkgraticule.py help’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/gdalsrsinfo help’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/ogrinfo help’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/testepsg -h’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/testepsg --help’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/testepsg help’ got 0 exit code
- ran ‘/nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0/bin/gdal-config --version’ and found version 2.3.0
- found 2.3.0 with grep in /nix/store/6zxb4kpk3mk347ypcxdc2dymq9gl37w7-gdal-2.3.0
- directory tree listing: https://gist.github.com/b6bcad3891a98e65991899121540cc85
- du listing: https://gist.github.com/f89d55b943a68b1550b8eff3f204f27f
Major upstream release.
Use GTK-3.
Use extras-depends: cdecimal, goocalendar
Major upstream release.
Use extras-depends: cdecimal html2text ipaddress
The patch fails to apply & may not be necessary any more. Trying to remove it for now just to see.

Hydra log: https://hydra.nixos.org/build/72726891/nixlog/1

Also see NixOS#33722

/cc @copumpkin
(cherry picked from commit f07c44b)
PR was incorrectly based on staging instead of master.
pgmanage: update to current name (minor).
coqPackages.stdpp: init at 1.1
failed because `pgrep -u` segfaults when accesss to proc info
is denied on a hardened system.
Without pillow, pygmentize fails to create a picture give a source
file with the error:

```
*** Error while highlighting:
PilNotAvailable: Python Imaging Library is required for this formatter
   (file "/nix/store/rd48ryf5yw14c0f4wa30m079lyvxjd4m-python2.7-Pygments-2.2.0/lib/python2.7/site-packages/pygments/formatters/img.py", line 336, in __init__)
*** If this is a bug you want to report, please rerun with -v.
```

The only remaining issue is that the default font may not be installed
on your system, but you can give it a different font via:

```
pygmentize -Ofont_name="Source Sans Pro" -o file.png file.yml
```
@dotlambda dotlambda changed the base branch from master to staging May 19, 2018 09:10
@FRidh
Copy link
Member

FRidh commented May 19, 2018

Pillow is an optional and heavy dependency which can be installed separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet