2013-11-07 17:32:23 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-Pillow
|
|
|
|
#
|
2018-01-10 15:05:00 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2013-11-07 17:32:23 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-04-12 20:20:07 +02:00
|
|
|
%define oldpython python
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2018-01-10 15:05:00 +01:00
|
|
|
%if 0%{?is_opensuse} || 0%{?suse_version} > 1330
|
|
|
|
%bcond_without tk
|
|
|
|
%else
|
|
|
|
%bcond_with tk
|
|
|
|
%endif
|
2013-11-07 17:32:23 +01:00
|
|
|
Name: python-Pillow
|
2018-01-10 15:05:00 +01:00
|
|
|
Version: 5.0.0
|
2013-11-07 17:32:23 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Python Imaging Library (Fork)
|
2013-11-14 14:21:19 +01:00
|
|
|
License: HPND
|
2013-11-07 17:32:23 +01:00
|
|
|
Group: Development/Languages/Python
|
|
|
|
Url: http://python-imaging.github.io/
|
2017-04-12 21:02:14 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/P/Pillow/Pillow-%{version}.tar.gz
|
2017-04-12 20:20:07 +02:00
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module olefile}
|
2018-01-10 15:05:00 +01:00
|
|
|
BuildRequires: %{python_module pytest-runner}
|
|
|
|
BuildRequires: %{python_module pytest}
|
2017-04-12 20:20:07 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: freetype2-devel
|
2018-01-10 15:05:00 +01:00
|
|
|
BuildRequires: libjpeg8-devel
|
|
|
|
BuildRequires: liblcms2-devel
|
2017-04-12 20:20:07 +02:00
|
|
|
BuildRequires: libtiff-devel
|
2018-01-10 15:05:00 +01:00
|
|
|
BuildRequires: libwebp-devel
|
2017-04-12 20:20:07 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2013-11-07 17:32:23 +01:00
|
|
|
BuildRequires: tix
|
|
|
|
BuildRequires: tk-devel
|
|
|
|
BuildRequires: unzip
|
2017-04-12 20:20:07 +02:00
|
|
|
BuildRequires: zlib-devel
|
|
|
|
Requires: python-olefile
|
2018-01-10 15:05:00 +01:00
|
|
|
%if %{with tk}
|
|
|
|
BuildRequires: %{python_module tk}
|
2015-07-27 16:26:41 +02:00
|
|
|
%endif
|
2014-05-27 14:54:18 +02:00
|
|
|
%if 0%{?suse_version} > 1315
|
Accepting request 233204 from home:frispete:python
New attempt to submit this, now providing python-imaging
@Sascha: sure, it might been wrong to provide python-imaging in the
first place, but python-Pillow without it doesn't make muchg sense,
or do you really want to adjust all dependant packages? Here, that
where scribus and python-repostlab, which both seem to work fine
with Pillow, apart from the imaging dependency.
BTW: this is the way, Redhat handles this issue, too.
Incorporated the new release, and added openjpeg2 dependency.
- New upstream release 2.4.0. For details see
https://pypi.python.org/pypi/Pillow/2.4.0
- New dependency: openjpeg2 for JPEG 2000 support
- provide python-imaging in order to act as a drop in replacement
for it.
- symlink alternatives files, as requested from Coolo, in order to
get rid of suse version conditional
OBS-URL: https://build.opensuse.org/request/show/233204
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pillow?expand=0&rev=13
2014-05-19 13:49:09 +02:00
|
|
|
BuildRequires: openjpeg2-devel
|
2013-11-07 17:32:23 +01:00
|
|
|
%endif
|
2017-04-12 20:20:07 +02:00
|
|
|
%ifpython2
|
2017-08-10 23:50:40 +02:00
|
|
|
# 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}
|
2017-04-12 20:20:07 +02:00
|
|
|
Provides: %{oldpython}-imaging = %{version}
|
2017-08-10 23:50:40 +02:00
|
|
|
Obsoletes: %{oldpython}-imaging-sane < %{version}
|
|
|
|
Provides: %{oldpython}-imaging-sane = %{version}
|
2017-04-12 20:20:07 +02:00
|
|
|
%endif
|
|
|
|
%ifpython3
|
2017-08-10 23:50:40 +02:00
|
|
|
Obsoletes: python3-imaging < %{version}
|
2017-04-12 20:20:07 +02:00
|
|
|
Provides: python3-imaging = %{version}
|
|
|
|
%endif
|
|
|
|
%python_subpackages
|
2013-11-07 17:32:23 +01:00
|
|
|
|
|
|
|
%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}
|
2017-08-09 20:33:34 +02:00
|
|
|
Requires: python-tk
|
2017-04-12 20:20:07 +02:00
|
|
|
%ifpython2
|
|
|
|
# NOTE: We don't need to conflict with python-imaging here,
|
2014-05-28 10:43:10 +02:00
|
|
|
# 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.
|
2017-08-10 23:50:40 +02:00
|
|
|
Obsoletes: %{oldpython}-imaging-tk < %{version}
|
|
|
|
Provides: %{oldpython}-imaging-tk = %{version}
|
2017-04-12 20:20:07 +02:00
|
|
|
%endif
|
2013-11-07 17:32:23 +01:00
|
|
|
|
|
|
|
%description tk
|
|
|
|
Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is the
|
|
|
|
Python Imaging Library by Fredrik Lundh and Contributors.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n Pillow-%{version}
|
|
|
|
|
|
|
|
%build
|
2017-04-12 20:20:07 +02:00
|
|
|
%python_build
|
2013-11-07 17:32:23 +01:00
|
|
|
|
|
|
|
%install
|
2017-04-12 20:20:07 +02:00
|
|
|
%python_install
|
|
|
|
|
|
|
|
%fdupes %{buildroot}%{_prefix}
|
2014-08-02 13:00:59 +02:00
|
|
|
# add missing path
|
2017-04-12 20:20:07 +02:00
|
|
|
%{python_expand echo "PIL" > %{buildroot}%{$python_sitearch}/PIL.pth}
|
2013-11-07 17:32:23 +01:00
|
|
|
|
|
|
|
%check
|
2017-04-12 20:20:07 +02:00
|
|
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
2016-05-23 12:02:04 +02:00
|
|
|
%ifarch ppc ppc64 s390 s390x
|
2017-04-12 20:20:07 +02:00
|
|
|
$python selftest.py --installed || \
|
2016-03-02 21:10:45 +01:00
|
|
|
echo "WARNING ignore failure https://github.com/python-pillow/Pillow/issues/1204"
|
2018-01-10 15:05:00 +01:00
|
|
|
$python setup.py test || \
|
2016-03-02 21:10:45 +01:00
|
|
|
echo "WARNING ignore failure https://github.com/python-pillow/Pillow/issues/1204"
|
|
|
|
%else
|
2017-04-12 20:20:07 +02:00
|
|
|
$python selftest.py --installed
|
2018-01-10 15:05:00 +01:00
|
|
|
$python setup.py test
|
2016-03-02 21:10:45 +01:00
|
|
|
%endif
|
2017-04-12 20:20:07 +02:00
|
|
|
}
|
2013-11-07 17:32:23 +01:00
|
|
|
|
2017-04-12 20:20:07 +02:00
|
|
|
%files %{python_files}
|
2016-03-13 21:33:01 +01:00
|
|
|
%doc CHANGES.rst README.rst LICENSE
|
2013-11-07 17:32:23 +01:00
|
|
|
%{python_sitearch}/PIL
|
2014-08-02 13:00:59 +02:00
|
|
|
%{python_sitearch}/PIL.pth
|
2017-04-12 20:20:07 +02:00
|
|
|
%{python_sitearch}/Pillow-%{version}-py%{python_version}.egg-info
|
2017-08-22 15:21:15 +02:00
|
|
|
|
|
|
|
%if %{with tk}
|
2013-11-07 17:32:23 +01:00
|
|
|
%exclude %{python_sitearch}/PIL/ImageTk*
|
|
|
|
%exclude %{python_sitearch}/PIL/_imagingtk*
|
2017-04-12 20:20:07 +02:00
|
|
|
%pycache_only %exclude %{python_sitearch}/PIL/__pycache__/ImageTk.*
|
2017-08-09 20:33:34 +02:00
|
|
|
%endif
|
|
|
|
|
2017-08-10 23:50:40 +02:00
|
|
|
%if %{with tk}
|
2017-04-12 20:20:07 +02:00
|
|
|
%files %{python_files tk}
|
2013-11-07 17:32:23 +01:00
|
|
|
%{python_sitearch}/PIL/ImageTk*
|
|
|
|
%{python_sitearch}/PIL/_imagingtk*
|
2017-04-12 20:20:07 +02:00
|
|
|
%pycache_only %{python_sitearch}/PIL/__pycache__/ImageTk.*
|
2013-11-07 17:32:23 +01:00
|
|
|
|
2017-08-09 20:33:34 +02:00
|
|
|
%endif
|
|
|
|
|
2013-11-07 17:32:23 +01:00
|
|
|
%changelog
|