-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
meta.yaml
104 lines (96 loc) · 3.47 KB
/
meta.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{% set version = "9.3.0" %}
package:
name: pillow
version: {{ version }}
source:
url: https://github.com/python-pillow/Pillow/archive/refs/tags/{{ version }}.tar.gz
sha256: 188b2a5fd445b2afa05bc0c1318ce49d4335ebbb69417fbb79acaf0a0784709e
patches:
- patches/0001-Build-without-USE_WIN32_FILEIO.patch
# upstream CI has a quirk that needs extra quotes for py37/py38 on windows;
# with our compilers, this just runs into failures, so we remove them
- patches/0002-Do-not-quote-PILLOW_VERSION.patch
# windows needs help detecting webpmux & xcb
- patches/0003-add-WEBP_ROOT-XCB_ROOT.patch
# fix provided by upstream maintainer for failing test
- patches/0004-Added-patch-to-fix-failing-Windows-test.patch
# osx failing an equality test with libjpeg-turbo, downgrade to similarity
- patches/0005-downgrade-equality-check-to-similarity-for-test_load.patch # [osx]
build:
number: 0
requirements:
build:
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- {{ compiler('c') }}
host:
- python
- pip
- setuptools
# libraries, c.f. https://github.com/python-pillow/Pillow/blob/9.0.0/setup.py#L30-L38
- freetype
# fribidi and libimagequant disabled due to
# GPL discussion, see #109 and #111
# - fribidi
- libjpeg-turbo
- openjpeg
- lcms2
# not available elsewhere
# currently disabled on windows due to libimagequant depending on llvm-openmp, see
# https://github.com/pytorch/pytorch/issues/72293
# - libimagequant # [x86_64 and not win]
- libtiff
- libwebp
- libxcb
- tk
- zlib
run:
- python
{% set tests_to_skip = "_not_a_real_test" %}
# compile smoke test failing to link python3x.lib
{% set tests_to_skip = tests_to_skip + " or test_embeddable" %} # [win]
# the following needs a viewer which we don't have
{% set tests_to_skip = tests_to_skip + " or (test_imageshow and test_show)" %} # [linux]
# this test is a known failure with libjpeg_turbo, but only marked as such for 2.0 upstream, not 2.x, see
# https://github.com/python-pillow/Pillow/blob/9.3.0/Tests/test_file_libtiff.py#L885-L891
{% set tests_to_skip = tests_to_skip + " or test_strip_ycbcr_jpeg_2x2_sampling" %} # [not osx]
# skip test that requires an image incorrectly flagged by AV
{% set tests_to_skip = tests_to_skip + " or test_tiff_crashes[Tests/images/crash-81154a65438ba5aaeca73fd502fa4850fbde60f8.tif]" %}
test:
imports:
- PIL
- PIL.Image
- PIL.ImageCms
source_files:
# from upstream repo
- Tests/
files:
# from recipe; some images cannot be in upstream repo, see Tests/README
- Tests/images
requires:
- pytest
- pytest-timeout
# test dependency, see Tests/test_image_access.py
- setuptools
- {{ compiler('c') }}
# for run_test.py
- fsspec
- aiohttp
- requests
commands:
- pytest -v -k "not ({{ tests_to_skip }})" # [not ppc64le]
# NOTE: test suite is skipped on ppc due to bugs in QEMU code that cause
# CI to fail, even though the tests should run through on native hardware
about:
home: https://pillow.readthedocs.io
license: LicenseRef-PIL
license_file: LICENSE
summary: Pillow is the friendly PIL fork by Alex Clark and Contributors
dev_url: https://github.com/python-pillow/Pillow/
extra:
recipe-maintainers:
- jakirkham
- patricksnape
- pelson
- ocefpaf
- h-vetinari