forked from pool/python-Pillow
cb624450b5
- update to 4.2.1: - CI: Fix version specification and test on CI for PyPy/Windows #2608 - Doc: Clarified Image.save:append_images documentation #2604 - CI: Amazon Linux and Centos6 docker images added to TravisCI #2585 - Image.alpha_composite added #2595 - Complex Text Support #2576 - Added threshold parameter to ImageDraw.floodfill #2599 - Added dBATCH parameter to ghostscript command #2588 - JPEG: Adjust buffer size when icc_profile > MAXBLOCK #2596 - Specify Pillow Version in one place #2517 - CI: Change the owner of the TRAVIS_BUILD_DIR, fixing broken docker runs #2587 - Fix truncated PNG loading for some images, Fix memory leak on truncated PNG images. #2541, #2598 - Add decompression bomb check to Image.crop #2410 - ImageFile: Ensure that the `err_code` variable is initialized in case of exception. #2363 - Tiff: Support append_images for saving multipage TIFFs #2406 - Doc: Clarify that draft is only implemented for JPEG and PCD #2409 - Test: MicImagePlugin #2447 - Use round() instead of floor() to eliminate zero coefficients in resample #2558 - Remove deprecated code #2549 - Added append_images to PDF saving #2526 - Remove unused function core image function new_array #2548 - Remove unnecessary calls to dict.keys() #2551 - Add more ImageDraw.py tests and remove unused Draw.c code #2533 - Test: More tests for ImageMorph #2554 - Test: McIDAS area file #2552 - Update Feature Detection #2520 - CI: Update pypy on TravisCI #2573 - ImageMorph: Fix wrong expected size of MRLs read from disk #2561 - Docs: Update install docs for FreeBSD #2546 - Build: Ignore OpenJpeg 1.5 on FreeBSD #2544 OBS-URL: https://build.opensuse.org/request/show/517892 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pillow?expand=0&rev=62
174 lines
5.6 KiB
RPMSpec
174 lines
5.6 KiB
RPMSpec
#
|
|
# spec file for package python-Pillow
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%if ! 0%{?is_opensuse} && 0%{?sle_version} && 0%{?sle_version} < 150000
|
|
%bcond_with tk
|
|
%else
|
|
%bcond_without tk
|
|
%endif
|
|
|
|
%define oldpython python
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
Name: python-Pillow
|
|
Version: 4.2.1
|
|
Release: 0
|
|
Summary: Python Imaging Library (Fork)
|
|
License: HPND
|
|
Group: Development/Languages/Python
|
|
Url: http://python-imaging.github.io/
|
|
Source: https://files.pythonhosted.org/packages/source/P/Pillow/Pillow-%{version}.tar.gz
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module nose}
|
|
BuildRequires: %{python_module olefile}
|
|
BuildRequires: %{python_module setuptools}
|
|
%if %{with tk}
|
|
BuildRequires: %{python_module tk}
|
|
%endif
|
|
BuildRequires: fdupes
|
|
BuildRequires: freetype2-devel
|
|
BuildRequires: libtiff-devel
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: tix
|
|
BuildRequires: tk-devel
|
|
BuildRequires: unzip
|
|
BuildRequires: zlib-devel
|
|
Requires: python-olefile
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%if 0%{?suse_version} > 1210
|
|
BuildRequires: libjpeg8-devel
|
|
BuildRequires: liblcms2-devel
|
|
BuildRequires: libwebp-devel
|
|
%else
|
|
%if 0%{?rhel} > 6
|
|
BuildRequires: lcms2-devel
|
|
BuildRequires: libjpeg-turbo-devel
|
|
BuildRequires: libwebp-devel
|
|
%else
|
|
BuildRequires: %{python_module unittest2}
|
|
%endif
|
|
%endif
|
|
%if 0%{?suse_version} > 1315
|
|
BuildRequires: openjpeg2-devel
|
|
%endif
|
|
%ifpython2
|
|
# Pillow is a friendly PIL fork which we used to package as 'imaging'
|
|
# Without providing python-imaging, all packages requiring it will break
|
|
Obsoletes: %{oldpython}-imaging < %{version}
|
|
Provides: %{oldpython}-imaging = %{version}
|
|
Obsoletes: %{oldpython}-imaging-sane < %{version}
|
|
Provides: %{oldpython}-imaging-sane = %{version}
|
|
%endif
|
|
%ifpython3
|
|
Obsoletes: python3-imaging < %{version}
|
|
Provides: python3-imaging = %{version}
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is the
|
|
Python Imaging Library by Fredrik Lundh and Contributors.
|
|
|
|
%package tk
|
|
Summary: Python Imaging Library (Fork) - Tcl/Tk Module
|
|
Group: Development/Languages/Python
|
|
Requires: %{name} = %{version}
|
|
Requires: python-tk
|
|
%ifpython2
|
|
# NOTE: We don't need to conflict with python-imaging here,
|
|
# because this package depends on python-Pillow, which already conflicts with python-imaging,
|
|
# so this cannot be installed alongside python-imaging
|
|
# And we cannot conflict with python-imaging directly, since python-Pillow provides python-imaging
|
|
# Just in case, conflict with python-imaging-tk in case it is ever implemented.
|
|
Obsoletes: %{oldpython}-imaging-tk < %{version}
|
|
Provides: %{oldpython}-imaging-tk = %{version}
|
|
%endif
|
|
|
|
%description tk
|
|
Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is the
|
|
Python Imaging Library by Fredrik Lundh and Contributors.
|
|
|
|
#NOTE(saschpe): No 'sane' subpackage like "python-imaging", that stuff
|
|
# would belong into python-pysane, if anybody would care :-)
|
|
|
|
%prep
|
|
%setup -q -n Pillow-%{version}
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
for p in pilconvert pildriver pilfile pilfont pilprint createfontdatachunk enhancer explode gifmaker painter player thresholder viewer; do
|
|
# retain old alternative-based names
|
|
mv %{buildroot}%{_bindir}/$p.py %{buildroot}%{_bindir}/$p
|
|
done
|
|
|
|
%fdupes %{buildroot}%{_prefix}
|
|
# add missing path
|
|
%{python_expand echo "PIL" > %{buildroot}%{$python_sitearch}/PIL.pth}
|
|
|
|
%check
|
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
|
%ifarch ppc ppc64 s390 s390x
|
|
$python selftest.py --installed || \
|
|
echo "WARNING ignore failure https://github.com/python-pillow/Pillow/issues/1204"
|
|
$python test-installed.py || \
|
|
echo "WARNING ignore failure https://github.com/python-pillow/Pillow/issues/1204"
|
|
%else
|
|
$python selftest.py --installed
|
|
$python test-installed.py
|
|
%endif
|
|
}
|
|
|
|
%files %{python_files}
|
|
%defattr(-,root,root,-)
|
|
%doc CHANGES.rst README.rst LICENSE
|
|
%python3_only %{_bindir}/pilconvert
|
|
%python3_only %{_bindir}/pildriver
|
|
%python3_only %{_bindir}/pilfile
|
|
%python3_only %{_bindir}/pilfont
|
|
%python3_only %{_bindir}/pilprint
|
|
%python3_only %{_bindir}/createfontdatachunk
|
|
%python3_only %{_bindir}/enhancer
|
|
%python3_only %{_bindir}/explode
|
|
%python3_only %{_bindir}/gifmaker
|
|
%python3_only %{_bindir}/painter
|
|
%python3_only %{_bindir}/player
|
|
%python3_only %{_bindir}/thresholder
|
|
%python3_only %{_bindir}/viewer
|
|
%{python_sitearch}/PIL
|
|
%{python_sitearch}/PIL.pth
|
|
%{python_sitearch}/Pillow-%{version}-py%{python_version}.egg-info
|
|
%if 0%{?is_opensuse}
|
|
%exclude %{python_sitearch}/PIL/ImageTk*
|
|
%exclude %{python_sitearch}/PIL/_imagingtk*
|
|
%pycache_only %exclude %{python_sitearch}/PIL/__pycache__/ImageTk.*
|
|
%endif
|
|
|
|
%if %{with tk}
|
|
|
|
%files %{python_files tk}
|
|
%defattr(-,root,root,-)
|
|
%{python_sitearch}/PIL/ImageTk*
|
|
%{python_sitearch}/PIL/_imagingtk*
|
|
%pycache_only %{python_sitearch}/PIL/__pycache__/ImageTk.*
|
|
|
|
%endif
|
|
|
|
%changelog
|