forked from pool/python-Pillow
Accepting request 516638 from devel:languages:python
- Improve TK handling. - Fix self-obsoletes OBS-URL: https://build.opensuse.org/request/show/516638 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Pillow?expand=0&rev=25
This commit is contained in:
commit
dc64aee390
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 10 21:36:33 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Improve TK handling.
|
||||||
|
- Fix self-obsoletes
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 9 17:47:29 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- python(3)-tk does not exist on SLE
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 12 19:01:50 UTC 2017 - toddrme2178@gmail.com
|
Wed Apr 12 19:01:50 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
@ -16,6 +16,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if ! 0%{?is_opensuse} && 0%{?sle_version} && 0%{?sle_version} < 150000
|
||||||
|
%bcond_with tk
|
||||||
|
%else
|
||||||
|
%bcond_without tk
|
||||||
|
%endif
|
||||||
|
|
||||||
%define oldpython python
|
%define oldpython python
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-Pillow
|
Name: python-Pillow
|
||||||
@ -30,7 +36,9 @@ BuildRequires: %{python_module devel}
|
|||||||
BuildRequires: %{python_module nose}
|
BuildRequires: %{python_module nose}
|
||||||
BuildRequires: %{python_module olefile}
|
BuildRequires: %{python_module olefile}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
%if %{with tk}
|
||||||
BuildRequires: %{python_module tk}
|
BuildRequires: %{python_module tk}
|
||||||
|
%endif
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: freetype2-devel
|
BuildRequires: freetype2-devel
|
||||||
BuildRequires: libtiff-devel
|
BuildRequires: libtiff-devel
|
||||||
@ -58,19 +66,15 @@ BuildRequires: %{python_module unittest2}
|
|||||||
BuildRequires: openjpeg2-devel
|
BuildRequires: openjpeg2-devel
|
||||||
%endif
|
%endif
|
||||||
%ifpython2
|
%ifpython2
|
||||||
Obsoletes: %{oldpython}-imaging-sane
|
# Pillow is a friendly PIL fork which we used to package as 'imaging'
|
||||||
Provides: %{oldpython}-imaging-sane
|
# Without providing python-imaging, all packages requiring it will break
|
||||||
|
Obsoletes: %{oldpython}-imaging < %{version}
|
||||||
# Pillow is a friendly PIL fork which we package as 'imaging', the latter isn't obsolete though:
|
|
||||||
# NOTE(saschpe): python-imaging should have never provided this and I'm a bit relucatant do it either.
|
|
||||||
# http://en.opensuse.org/openSUSE:Upgrade_dependencies_explanation#Replace_a_package_by_another_with_the_same_functionality
|
|
||||||
# ALSO NOTE (frispete): without providing python-imaging, all packages requiring it will break
|
|
||||||
Conflicts: %{oldpython}-imaging < %{version}
|
|
||||||
Provides: %{oldpython}-imaging = %{version}
|
Provides: %{oldpython}-imaging = %{version}
|
||||||
|
Obsoletes: %{oldpython}-imaging-sane < %{version}
|
||||||
|
Provides: %{oldpython}-imaging-sane = %{version}
|
||||||
%endif
|
%endif
|
||||||
# explicitly do this for python 2 and 3 but not other versions which never had an -imaging package
|
|
||||||
%ifpython3
|
%ifpython3
|
||||||
Conflicts: python3-imaging < %{version}
|
Obsoletes: python3-imaging < %{version}
|
||||||
Provides: python3-imaging = %{version}
|
Provides: python3-imaging = %{version}
|
||||||
%endif
|
%endif
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@ -83,14 +87,15 @@ Python Imaging Library by Fredrik Lundh and Contributors.
|
|||||||
Summary: Python Imaging Library (Fork) - Tcl/Tk Module
|
Summary: Python Imaging Library (Fork) - Tcl/Tk Module
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
|
Requires: python-tk
|
||||||
%ifpython2
|
%ifpython2
|
||||||
# NOTE: We don't need to conflict with python-imaging here,
|
# NOTE: We don't need to conflict with python-imaging here,
|
||||||
# because this package depends on python-Pillow, which already conflicts with python-imaging,
|
# because this package depends on python-Pillow, which already conflicts with python-imaging,
|
||||||
# so this cannot be installed alongside python-imaging
|
# so this cannot be installed alongside python-imaging
|
||||||
# And we cannot conflict with python-imaging directly, since python-Pillow provides 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.
|
# Just in case, conflict with python-imaging-tk in case it is ever implemented.
|
||||||
Obsoletes: %{oldpython}-imaging-tk
|
Obsoletes: %{oldpython}-imaging-tk < %{version}
|
||||||
Provides: %{oldpython}-imaging-tk
|
Provides: %{oldpython}-imaging-tk = %{version}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description tk
|
%description tk
|
||||||
@ -149,9 +154,13 @@ $python test-installed.py
|
|||||||
%{python_sitearch}/PIL
|
%{python_sitearch}/PIL
|
||||||
%{python_sitearch}/PIL.pth
|
%{python_sitearch}/PIL.pth
|
||||||
%{python_sitearch}/Pillow-%{version}-py%{python_version}.egg-info
|
%{python_sitearch}/Pillow-%{version}-py%{python_version}.egg-info
|
||||||
|
%if 0%{?is_opensuse}
|
||||||
%exclude %{python_sitearch}/PIL/ImageTk*
|
%exclude %{python_sitearch}/PIL/ImageTk*
|
||||||
%exclude %{python_sitearch}/PIL/_imagingtk*
|
%exclude %{python_sitearch}/PIL/_imagingtk*
|
||||||
%pycache_only %exclude %{python_sitearch}/PIL/__pycache__/ImageTk.*
|
%pycache_only %exclude %{python_sitearch}/PIL/__pycache__/ImageTk.*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with tk}
|
||||||
|
|
||||||
%files %{python_files tk}
|
%files %{python_files tk}
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -159,4 +168,6 @@ $python test-installed.py
|
|||||||
%{python_sitearch}/PIL/_imagingtk*
|
%{python_sitearch}/PIL/_imagingtk*
|
||||||
%pycache_only %{python_sitearch}/PIL/__pycache__/ImageTk.*
|
%pycache_only %{python_sitearch}/PIL/__pycache__/ImageTk.*
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user