3 %bcond_without tk # build without tkinter support
4 %bcond_with sane # build with sane support
7 Summary: Python's own image processing library
8 Summary(pl.UTF-8): Biblioteka do przetwarzania obrazu w Pythonie
14 Group: Libraries/Python
15 Source0: http://effbot.org/downloads/Imaging-%{version}.tar.gz
16 # Source0-md5: fc14a54e1ce02a0225be8854bfba478e
17 Patch0: %{name}-lib64.patch
18 Patch1: %{name}-viewer.patch
19 Patch2: python-imaging-1.1.6-sane-types.patch
20 Patch3: python-imaging-giftrans.patch
21 URL: http://www.pythonware.com/products/pil/
22 BuildRequires: freetype-devel >= 1:2.3.9
23 BuildRequires: lcms-devel >= 1.1.5
24 BuildRequires: libjpeg-devel >= 6a
25 BuildRequires: python >= 1:2.5
26 BuildRequires: python-devel >= 1:2.5
27 %{?with_tk:BuildRequires: python-tkinter}
28 BuildRequires: rpm-pythonprov
29 BuildRequires: rpmbuild(macros) >= 1.219
30 %{?with_sane:BuildRequires: sane-backends-devel}
31 %{?with_tk:BuildRequires: tk-devel}
32 BuildRequires: zlib-devel >= 1.2.3
33 %pyrequires_eq python-libs
34 Requires: freetype >= 1:2.3.9
35 Requires: lcms >= 1.1.5
36 Requires: zlib >= 1.2.3
37 Obsoletes: python-Imaging
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 The Python Imaging Library (PIL) adds image processing capabilities to
42 your Python interpreter. This library provides extensive file format
43 support, an efficient internal representation, and powerful image
44 processing capabilities.
46 %description -l pl.UTF-8
47 Python Imaging Library (PIL) dodaje możliwość przetwarzania obrazu do
48 interpretera Pythona. Biblioteka ma obsługę wielu formatów plików,
49 wydajną reprezentację wewnętrzną i duże możliwości obróbki.
52 Summary: Python Module for using scanners
53 Summary(pl.UTF-8): Moduły Pythona do używania skanerów
55 Requires: %{name} = %{epoch}:%{version}-%{release}
58 This package contains the sane module for Python which provides access
59 to various raster scanning devices such as flatbed scanners and
62 %description sane -l pl.UTF-8
63 Ten pakiet zawiera moduł sane dla Pythona, dający dostęp do wielu
64 rastrowych urządzeń skanujących, takich jak skanery płaskie i aparaty
68 Summary: Tk interface for python-imaging
69 Summary(pl.UTF-8): Interfejs Tk do modułów python-imaging
71 Requires: %{name} = %{epoch}:%{version}-%{release}
72 Requires: python-tkinter
73 Conflicts: %{name} < 1:1.1.6-6
76 This package contains a Tk interface for python-imaging.
78 %description tk -l pl.UTF-8
79 Ten pakiet zawiera interfejs Tk do modułów python-imaging.
82 Summary: Python's own image processing library header files
83 Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki obróbki obrazu w Pythonie
84 Group: Development/Languages/Python
85 Requires: %{name} = %{epoch}:%{version}-%{release}
86 Requires: libjpeg-devel
87 Requires: python-devel
89 Obsoletes: python-Imaging-devel
92 Python's own image processing library header files.
94 %description devel -l pl.UTF-8
95 Pliki nagłówkowe do biblioteki obróbki obrazu w Pythonie.
98 %setup -q -n Imaging-%{version}
99 %if %{_lib} == "lib64"
106 # fix the interpreter path for Scripts/*.py
107 sed -i -e "s|/usr/local/bin/python|%{_bindir}/python|" Scripts/*.py
110 export CFLAGS="%{rpmcflags}"
111 %{__python} setup.py build_ext -i
112 %{__python} selftest.py
116 %{__python} setup.py build
120 rm -rf $RPM_BUILD_ROOT
121 %{__python} setup.py install \
123 --root=$RPM_BUILD_ROOT
127 %{__python} setup.py install \
129 --root=$RPM_BUILD_ROOT
133 install -d $RPM_BUILD_ROOT%{py_incdir}
134 cp -a libImaging/Im{Platform,aging}.h $RPM_BUILD_ROOT%{py_incdir}
136 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
137 mv $RPM_BUILD_ROOT{%{_bindir}/pil*.py,%{_examplesdir}/%{name}-%{version}}
139 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/%{module}
144 rm -rf $RPM_BUILD_ROOT
147 %defattr(644,root,root,755)
149 %{py_sitedir}/%{module}.pth
150 %dir %{py_sitedir}/%{module}
151 %{py_sitedir}/%{module}/*.py[co]
152 %attr(755,root,root) %{py_sitedir}/%{module}/_imaging*.so
153 %if "%{py_ver}" > "2.4"
154 %{py_sitedir}/%{module}/%{module}-*.egg-info
157 %{_examplesdir}/%{name}-%{version}
160 %exclude %{py_sitedir}/%{module}/ImageTk.py[co]
161 %exclude %{py_sitedir}/%{module}/SpiderImagePlugin.py[co]
162 %exclude %{py_sitedir}/%{module}/_imagingtk.so
167 %defattr(644,root,root,755)
168 %doc Sane/CHANGES Sane/demo*.py Sane/sanedoc.txt
169 %{py_sitedir}/sane.py[co]
170 %attr(755,root,root) %{py_sitedir}/_sane.so
171 %if "%{py_ver}" > "2.4"
172 %{py_sitedir}/pysane-*.egg-info
178 %defattr(644,root,root,755)
179 %{py_sitedir}/%{module}/ImageTk.py[co]
180 %{py_sitedir}/%{module}/SpiderImagePlugin.py[co]
181 %attr(755,root,root) %{py_sitedir}/%{module}/_imagingtk.so
185 %defattr(644,root,root,755)
186 %{py_incdir}/ImPlatform.h
187 %{py_incdir}/Imaging.h