modify python_pillow.spec
This commit is contained in:
parent
bf8de4d156
commit
717b2e0700
@ -3,8 +3,6 @@
|
||||
%global py2_libbuilddir %(python2 -c 'import sys; import sysconfig; print("lib.{p}-{v[0]}.{v[1]}".format(p=sysconfig.get_platform(), v=sys.version_info))')
|
||||
%global py3_libbuilddir %(python3 -c 'import sys; import sysconfig; print("lib.{p}-{v[0]}.{v[1]}".format(p=sysconfig.get_platform(), v=sys.version_info))')
|
||||
|
||||
%global srcname pillow
|
||||
|
||||
Name: python-pillow
|
||||
Version: 5.3.0
|
||||
Release: 3
|
||||
@ -14,7 +12,7 @@ URL: http://python-pillow.github.io/
|
||||
Source0: https://github.com/python-pillow/Pillow/archive/%{version}/Pillow-%{version}.tar.gz
|
||||
BuildRequires: freetype-devel ghostscript lcms2-devel libimagequant-devel libjpeg-devel
|
||||
BuildRequires: libtiff-devel libwebp-devel openjpeg2-devel tk-devel zlib-devel
|
||||
BuildRequires: python2-cffi python2-devel python2-numpy python2-olefile python2-setuptools
|
||||
BuildRequires: python2-cffi python2-devel python2-numpy python2-olefile python2-setuptools
|
||||
BuildRequires: python2-sphinx python2-sphinx_rtd_theme python2-tkinter
|
||||
BuildRequires: python3-cffi python3-devel python3-numpy python3-olefile
|
||||
BuildRequires: python3-setuptools python3-sphinx python3-sphinx_rtd_theme python3-tkinter
|
||||
@ -32,24 +30,15 @@ Library by Fredrik Lundh and Contributors. As of 2019, Pillow development is sup
|
||||
%package -n python2-pillow
|
||||
Summary: Python 2 image processing library
|
||||
%{?python_provide:%python_provide python2-pillow}
|
||||
Provides: python-imaging = %{version}-%{release}
|
||||
Provides: python2-imaging = %{version}-%{release}
|
||||
Requires: python2-olefile
|
||||
Provides: python-imaging = %{version}-%{release} python2-imaging = %{version}-%{release}
|
||||
Provides: python2-pillow-tk = %{version}-%{release} python2-pillow-qt = %{version}-%{release}
|
||||
Provides: python-imaging-tk = %{version}-%{release} python2-imaging-tk = %{version}-%{release}
|
||||
Provides: python-imaging-qt = %{version}-%{release} python2-imaging-qt = %{version}-%{release}
|
||||
Requires: python2-olefile python2-tkinter python2-PyQt4
|
||||
|
||||
Provides: python2-pillow-tk = %{version}-%{release}
|
||||
Obsoletes: python2-pillow-tk < %{version}-%{release}
|
||||
Requires: python2-tkinter
|
||||
Obsoletes: python2-pillow-tk < %{version}-%{release} python2-pillow-qt < %{version}-%{release}
|
||||
%{?python_provide:%python_provide python2-pillow-tk}
|
||||
Provides: python-imaging-tk = %{version}-%{release}
|
||||
Provides: python2-imaging-tk = %{version}-%{release}
|
||||
|
||||
Provides: python2-pillow-qt = %{version}-%{release}
|
||||
Obsoletes: python2-pillow-qt < %{version}-%{release}
|
||||
Requires: python2-PyQt4
|
||||
%{?python_provide:%python_provide python2-pillow-qt}
|
||||
Provides: python-imaging-qt = %{version}-%{release}
|
||||
Provides: python2-imaging-qt = %{version}-%{release}
|
||||
|
||||
|
||||
%description -n python2-pillow
|
||||
Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging \
|
||||
@ -58,24 +47,21 @@ Library by Fredrik Lundh and Contributors. As of 2019, Pillow development is sup
|
||||
|
||||
%package -n python2-pillow-devel
|
||||
Summary: Development files for pillow
|
||||
Requires: python2-devel, libjpeg-devel, zlib-devel
|
||||
Requires: python2-pillow%{?_isa} = %{version}-%{release}
|
||||
Requires: python2-devel libjpeg-devel zlib-devel python2-pillow = %{version}-%{release}
|
||||
%{?python_provide:%python_provide python2-pillow-devel}
|
||||
Provides: python-imaging-devel = %{version}-%{release}
|
||||
Provides: python2-imaging-devel = %{version}-%{release}
|
||||
Provides: python-imaging-devel = %{version}-%{release} python2-imaging-devel = %{version}-%{release}
|
||||
|
||||
%description -n python2-pillow-devel
|
||||
Development files for pillow.
|
||||
|
||||
%package -n python2-pillow-help
|
||||
Provides: python2-pillow-doc = %{version}-%{release}
|
||||
Obsoletes: python2-pillow-doc < %{version}-%{release}
|
||||
Summary: Documentation for pillow
|
||||
BuildArch: noarch
|
||||
Requires: python2-pillow = %{version}-%{release}
|
||||
%{?python_provide:%python_provide python2-pillow-doc}
|
||||
Provides: python-imaging-doc = %{version}-%{release}
|
||||
Provides: python2-imaging-doc = %{version}-%{release}
|
||||
Provides: python-imaging-doc = %{version}-%{release} python2-imaging-doc = %{version}-%{release}
|
||||
Provides: python2-pillow-doc = %{version}-%{release}
|
||||
Obsoletes: python2-pillow-doc < %{version}-%{release}
|
||||
|
||||
%description -n python2-pillow-help
|
||||
Documentation for pillow.
|
||||
@ -85,29 +71,20 @@ Documentation for pillow.
|
||||
Summary: Python 3 image processing library
|
||||
%{?python_provide:%python_provide python3-pillow}
|
||||
Provides: python3-imaging = %{version}-%{release}
|
||||
Requires: python3-olefile
|
||||
|
||||
Provides: python3-pillow-tk = %{version}-%{release}
|
||||
Obsoletes: python3-pillow-tk < %{version}-%{release}
|
||||
Requires: python3-tkinter
|
||||
Provides: python3-pillow-tk = %{version}-%{release} python3-imaging-tk = %{version}-%{release}
|
||||
Provides: python3-pillow-qt = %{version}-%{release} python3-imaging-qt = %{version}-%{release}
|
||||
Requires: python3-olefile python3-tkinter python3-PyQt4
|
||||
Obsoletes: python3-pillow-tk < %{version}-%{release} python3-pillow-qt < %{version}-%{release}
|
||||
%{?python_provide:%python_provide python3-pillow-tk}
|
||||
Provides: python3-imaging-tk = %{version}-%{release}
|
||||
|
||||
Provides: python3-pillow-qt = %{version}-%{release}
|
||||
Obsoletes: python3-pillow-qt < %{version}-%{release}
|
||||
Requires: python3-PyQt4
|
||||
%{?python_provide:%python_provide python3-pillow-qt}
|
||||
Provides: python3-imaging-qt = %{version}-%{release}
|
||||
|
||||
%description -n python3-pillow
|
||||
Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging \
|
||||
Library by Fredrik Lundh and Contributors. As of 2019, Pillow development is supported by Tidelift.
|
||||
|
||||
|
||||
%package -n python3-pillow-devel
|
||||
Summary: Development files for pillow
|
||||
Requires: python3-devel, libjpeg-devel, zlib-devel
|
||||
Requires: python3-pillow%{?_isa} = %{version}-%{release}
|
||||
Requires: python3-devel libjpeg-devel zlib-devel python3-pillow = %{version}-%{release}
|
||||
%{?python_provide:%python_provide python3-pillow-devel}
|
||||
Provides: python3-imaging-devel = %{version}-%{release}
|
||||
|
||||
@ -115,13 +92,12 @@ Provides: python3-imaging-devel = %{version}-%{release}
|
||||
Development files for pillow.
|
||||
|
||||
%package -n python3-pillow-help
|
||||
Provides: python3-pillow-doc = %{version}-%{release}
|
||||
Obsoletes: python3-pillow-doc < %{version}-%{release}
|
||||
Summary: Documentation for pillow
|
||||
BuildArch: noarch
|
||||
Requires: python3-pillow = %{version}-%{release}
|
||||
%{?python_provide:%python_provide python3-pillow-doc}
|
||||
Provides: python3-imaging-doc = %{version}-%{release}
|
||||
Provides: python3-imaging-doc = %{version}-%{release} python3-pillow-doc = %{version}-%{release}
|
||||
Obsoletes: python3-pillow-doc < %{version}-%{release}
|
||||
|
||||
%description -n python3-pillow-help
|
||||
Documentation for pillow.
|
||||
@ -140,10 +116,10 @@ rm -f docs/_build_py3/html/.buildinfo
|
||||
|
||||
|
||||
%install
|
||||
install -d %{buildroot}/%{py2_incdir}/Imaging
|
||||
mkdir -p %{buildroot}/%{py2_incdir}/Imaging
|
||||
install -m 644 src/libImaging/*.h %{buildroot}/%{py2_incdir}/Imaging
|
||||
%py2_install
|
||||
install -d %{buildroot}/%{py3_incdir}/Imaging
|
||||
mkdir -p %{buildroot}/%{py3_incdir}/Imaging
|
||||
install -m 644 src/libImaging/*.h %{buildroot}/%{py3_incdir}/Imaging
|
||||
%py3_install
|
||||
|
||||
@ -151,14 +127,14 @@ install -m 644 src/libImaging/*.h %{buildroot}/%{py3_incdir}/Imaging
|
||||
%check
|
||||
ln -s $PWD/Images $PWD/build/%py2_libbuilddir/Images
|
||||
cp -R $PWD/Tests $PWD/build/%py2_libbuilddir/Tests
|
||||
cp -R $PWD/selftest.py $PWD/build/%py2_libbuilddir/selftest.py
|
||||
install $PWD/selftest.py $PWD/build/%py2_libbuilddir/selftest.py
|
||||
pushd build/%py2_libbuilddir
|
||||
PYTHONPATH=$PWD %{__python2} selftest.py
|
||||
popd
|
||||
|
||||
ln -s $PWD/Images $PWD/build/%py3_libbuilddir/Images
|
||||
cp -R $PWD/Tests $PWD/build/%py3_libbuilddir/Tests
|
||||
cp -R $PWD/selftest.py $PWD/build/%py3_libbuilddir/selftest.py
|
||||
install $PWD/selftest.py $PWD/build/%py3_libbuilddir/selftest.py
|
||||
pushd build/%py3_libbuilddir
|
||||
PYTHONPATH=$PWD %{__python3} selftest.py
|
||||
popd
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user