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