1 | # if you wanna test, add " --define '_run_test 1' " option to rpmbuild command |
---|
2 | %define run_test %{?_run_test:1}%{!?_run_test:0} |
---|
3 | %define TclTk 8.4 |
---|
4 | %define pybasever 3.1 |
---|
5 | %define python_lib %{_libdir}/python%{pybasever} |
---|
6 | Summary: An interpreted, interactive, object-oriented programming language. |
---|
7 | Summary(ja): オブジェクト指向 Python3 インタプリタ |
---|
8 | Name: python3 |
---|
9 | Version: %{pybasever}.3 |
---|
10 | Release: 2%{?_dist_release} |
---|
11 | License: Modified CNRI Open Source License |
---|
12 | Group: Development/Languages |
---|
13 | URL: http://www.python.org/download/releases/%{version} |
---|
14 | Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2 |
---|
15 | Source1: http://docs.python.org/py3k/archives/python-%{version}-docs-html.tar.bz2 |
---|
16 | Patch0: python-3.1.3-Setup.dist.patch |
---|
17 | Patch10: python-3.1.3-locale.patch |
---|
18 | Patch100: python-3.1.3-lib64-Makefile.patch |
---|
19 | Patch101: python-3.1.3-lib64-setup.patch |
---|
20 | Patch102: python-3.1.3-lib64-site.patch |
---|
21 | Patch103: python-3.1.3-lib64-install.patch |
---|
22 | Patch104: python-3.1.3-lib64-sysconfig.patch |
---|
23 | Patch105: python-3.1.3-lib64-getpath.patch |
---|
24 | Patch106: python-3.1.3-lib64-test_install.patch |
---|
25 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
26 | BuildRequires: gzip tar gcc-c++ pkgconfig sed findutils |
---|
27 | BuildRequires: bzip2-devel |
---|
28 | BuildRequires: gdbm-devel |
---|
29 | BuildRequires: glibc-devel |
---|
30 | BuildRequires: ncurses-devel |
---|
31 | BuildRequires: openssl-devel |
---|
32 | BuildRequires: readline-devel |
---|
33 | BuildRequires: sqlite3-devel |
---|
34 | BuildRequires: zlib-devel |
---|
35 | BuildRequires: libffi-devel |
---|
36 | Requires: bzip2 |
---|
37 | Requires: gdbm |
---|
38 | Requires: ncurses |
---|
39 | Requires: openssl |
---|
40 | Requires: readline |
---|
41 | Requires: sqlite3 |
---|
42 | Requires: zlib |
---|
43 | Packager: owa |
---|
44 | Vendor: Project Vine |
---|
45 | Distribution: Vine Linux |
---|
46 | |
---|
47 | %description |
---|
48 | Python is an interpreted, interactive, object-oriented programming |
---|
49 | language often compared to Tcl, Perl, Scheme or Java. Python includes |
---|
50 | modules, classes, exceptions, very high level dynamic data types and |
---|
51 | dynamic typing. Python supports interfaces to many system calls and |
---|
52 | libraries, as well as to various windowing systems (X11, Motif, Tk, |
---|
53 | Mac and MFC). |
---|
54 | |
---|
55 | Programmers can write new built-in modules for Python in C or C++. |
---|
56 | Python can be used as an extension language for applications that need |
---|
57 | a programmable interface. This package contains most of the standard |
---|
58 | Python modules, as well as modules for interfacing to the Tix widget |
---|
59 | set for Tk and RPM. |
---|
60 | |
---|
61 | Note that documentation for Python is provided in the python-docs |
---|
62 | package. |
---|
63 | |
---|
64 | %package devel |
---|
65 | Summary: The libraries and header files needed for Python development. |
---|
66 | Group: Development/Libraries |
---|
67 | |
---|
68 | %description devel |
---|
69 | The Python programming language's interpreter can be extended with |
---|
70 | dynamically loaded extensions and can be embedded in other programs. |
---|
71 | This package contains the header files and libraries needed to do |
---|
72 | these types of tasks. |
---|
73 | |
---|
74 | Install python-devel if you want to develop Python extensions. The |
---|
75 | python package will also need to be installed. You'll probably also |
---|
76 | want to install the python-docs package, which contains Python |
---|
77 | documentation. |
---|
78 | |
---|
79 | %package tkinter |
---|
80 | Summary: A graphical user interface for the Python scripting language. |
---|
81 | Group: Development/Languages |
---|
82 | Requires: %{name} = %{version} |
---|
83 | Requires: tcl, tk, tix |
---|
84 | Requires: libX11, libxcb, libXau, libXdmcp |
---|
85 | BuildRequires: tcl, tk, tix |
---|
86 | BuildRequires: libX11-devel, libxcb-devel, libXau-devel, libXdmcp-devel |
---|
87 | |
---|
88 | %description tkinter |
---|
89 | The Tkinter (Tk interface) program is an graphical user interface for |
---|
90 | the Python scripting language. |
---|
91 | |
---|
92 | You should install the tkinter package if you'd like to use a graphical |
---|
93 | user interface for Python programming. |
---|
94 | |
---|
95 | %package tools |
---|
96 | Summary: A collection of development tools included with Python. |
---|
97 | Group: Development/Tools |
---|
98 | Requires: %{name} = %{version} |
---|
99 | Requires: %{name}-tkinter = %{version} |
---|
100 | |
---|
101 | %description tools |
---|
102 | The Python package includes several development tools that are used |
---|
103 | to build python programs. |
---|
104 | |
---|
105 | %package docs |
---|
106 | Summary: Documentation for the Python programming language. |
---|
107 | Group: Documentation |
---|
108 | |
---|
109 | %description docs |
---|
110 | The python-docs package contains documentation on the Python |
---|
111 | programming language and interpreter. The documentation is provided |
---|
112 | in ASCII text files and in LaTeX source files. |
---|
113 | |
---|
114 | Install the python-docs package if you'd like to use the documentation |
---|
115 | for the Python language. |
---|
116 | |
---|
117 | |
---|
118 | %prep |
---|
119 | %setup -q -n Python-%{version} |
---|
120 | %patch0 -p1 -b .Setup |
---|
121 | %patch10 -p1 -b .locale |
---|
122 | |
---|
123 | %if %{_lib} == lib64 |
---|
124 | %patch100 -p1 -b .lib64-Makefile |
---|
125 | %patch101 -p1 -b .lib64-setup |
---|
126 | %patch102 -p1 -b .lib64-site |
---|
127 | %patch103 -p1 -b .lib64-install |
---|
128 | %patch104 -p1 -b .lib64-sysconfig |
---|
129 | %patch105 -p1 -b .lib64-getpath |
---|
130 | %patch106 -p1 -b .test_install |
---|
131 | %endif |
---|
132 | |
---|
133 | # fix Tcl/Tk versions |
---|
134 | pushd Modules |
---|
135 | mv Setup.dist Setup.dist.old |
---|
136 | cat Setup.dist.old \ |
---|
137 | | sed "s^-ltcl^-ltcl%{TclTk}^" \ |
---|
138 | | sed "s^-ltk^-ltk%{TclTk}^" \ |
---|
139 | | sed "s^-ltix^-ltix%{TclTk}^" \ |
---|
140 | > Setup.dist |
---|
141 | rm -f Setup.dist.old |
---|
142 | popd |
---|
143 | |
---|
144 | |
---|
145 | %build |
---|
146 | topdir=`pwd` |
---|
147 | %configure \ |
---|
148 | --enable-shared \ |
---|
149 | --enable-ipv6 \ |
---|
150 | --enable-profiling \ |
---|
151 | --with-wide-unicode \ |
---|
152 | --with-system-ffi \ |
---|
153 | --with-signal-module \ |
---|
154 | ; |
---|
155 | make %{?_smp_mflags} |
---|
156 | |
---|
157 | ## rebuild with new python |
---|
158 | export LD_LIBRARY_PATH=$topdir |
---|
159 | export PATH="$topdir:$PATH" |
---|
160 | ln -s $topdir/python $topdir/python%{pybasever} |
---|
161 | #$topdir/python Tools/scripts/pathfix.py -i "/usr/bin/env python%{pybasever}" . |
---|
162 | make %{?_smp_mflags} |
---|
163 | |
---|
164 | %if %{run_test} |
---|
165 | #%%check |
---|
166 | find ./Lib -name '*.py[co]' -print | xargs rm -f |
---|
167 | LD_LIBRARY_PATH=$topdir:$topdir/Modules:$topdir/build/lib.linux-%{_host_cpu}-%{pybasever} |
---|
168 | PYTHONHOME=$topdir |
---|
169 | PYTHONPATH=$topdir/Lib:$topdir/Lib/test:$topdir/Lib/lib-tk:$topdir/Lib/site-packages |
---|
170 | PYTHONPATH=$PYTHONPATH:$LD_LIBRARY_PATH |
---|
171 | export PYTHONHOME PYTHONPATH LD_LIBRARY_PATH |
---|
172 | SKIPLIST="-x test_cmd_line" |
---|
173 | ./python -tt -E ./Lib/test/regrtest.py -l -w $SKIPLIST 2>&1 | tee make.check1.log |
---|
174 | ./python -tt -E ./Lib/test/regrtest.py -l -w $SKIPLIST 2>&1 | tee make.check2.log |
---|
175 | #-------------------------------## |
---|
176 | # Mon Nov 29 2010 ...last tested |
---|
177 | # 314 tests OK. |
---|
178 | # 4 tests failed: |
---|
179 | # test_cmd_line: "Lib/test/test_cmd_line.py", line 190, in test_large_PYTHONPATH |
---|
180 | # test_httpservers: Lib/test/test_httpservers.py", line 399 in tearDown |
---|
181 | # test_pydoc: Lib/test/test_pydoc.py", line 299, in test_badimport |
---|
182 | # test_warnings: Lib/test/test_warnings.py", line 707, in test_issue_8766 |
---|
183 | # 22 tests skipped: |
---|
184 | # 2 skips unexpected on linux2: |
---|
185 | #-------------------------------## |
---|
186 | %endif |
---|
187 | |
---|
188 | |
---|
189 | %install |
---|
190 | rm -fr $RPM_BUILD_ROOT |
---|
191 | make DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} install |
---|
192 | |
---|
193 | ## Clean up the testsuite - we don't need compiled files for it |
---|
194 | find $RPM_BUILD_ROOT%{python_lib}/test \ |
---|
195 | -name "*.pyc" -o -name "*.pyo" | xargs rm -f |
---|
196 | |
---|
197 | chmod 755 $RPM_BUILD_ROOT%{_libdir}/libpython*.so.* |
---|
198 | chmod 755 $RPM_BUILD_ROOT%{python_lib}/lib-dynload/*.so |
---|
199 | find $RPM_BUILD_ROOT%{python_lib} -perm -o=x -name '*.py' | xargs chmod -x |
---|
200 | mv $RPM_BUILD_ROOT%{_bindir}/2to3 $RPM_BUILD_ROOT%{_bindir}/2to3.1 |
---|
201 | |
---|
202 | |
---|
203 | ## html document |
---|
204 | tar xvzf %SOURCE1 |
---|
205 | if [ -d Doc/html ] ; then |
---|
206 | rm -r Doc/html |
---|
207 | fi |
---|
208 | mv python-%{version}-docs-html Doc/html |
---|
209 | |
---|
210 | |
---|
211 | %post -p /sbin/ldconfig |
---|
212 | %postun -p /sbin/ldconfig |
---|
213 | %clean |
---|
214 | rm -fr $RPM_BUILD_ROOT |
---|
215 | |
---|
216 | %files |
---|
217 | %defattr(-, root, root) |
---|
218 | %doc LICENSE README |
---|
219 | %{_bindir}/%{name} |
---|
220 | %{_bindir}/%{name}-config |
---|
221 | %{_bindir}/python%{pybasever} |
---|
222 | %{_bindir}/python%{pybasever}-config |
---|
223 | %{_libdir}/libpython%{pybasever}.so* |
---|
224 | %{_libdir}/pkgconfig/python-%{pybasever}.pc |
---|
225 | %{_libdir}/pkgconfig/python3.pc |
---|
226 | %{_mandir}/man1/* |
---|
227 | %dir %{python_lib} |
---|
228 | %dir %{python_lib}/site-packages |
---|
229 | %{python_lib}/LICENSE.txt |
---|
230 | %{python_lib}/*.py* |
---|
231 | %{python_lib}/*.doc |
---|
232 | %{python_lib}/ctypes |
---|
233 | %{python_lib}/curses |
---|
234 | %{python_lib}/distutils |
---|
235 | %{python_lib}/dbm |
---|
236 | %{python_lib}/email |
---|
237 | %{python_lib}/encodings |
---|
238 | %{python_lib}/html |
---|
239 | %{python_lib}/http |
---|
240 | %{python_lib}/importlib |
---|
241 | %{python_lib}/json |
---|
242 | %{python_lib}/logging |
---|
243 | %{python_lib}/multiprocessing |
---|
244 | %{python_lib}/plat-linux2 |
---|
245 | %{python_lib}/pydoc_data |
---|
246 | %{python_lib}/sqlite3 |
---|
247 | %{python_lib}/urllib |
---|
248 | %{python_lib}/wsgiref |
---|
249 | %{python_lib}/wsgiref.egg-info |
---|
250 | %{python_lib}/xml |
---|
251 | %{python_lib}/xmlrpc |
---|
252 | %{python_lib}/lib-dynload |
---|
253 | %exclude %{python_lib}/lib-dynload/_tkinter.so |
---|
254 | |
---|
255 | %files devel |
---|
256 | %defattr(-,root,root) |
---|
257 | %{_includedir}/python%{pybasever} |
---|
258 | %{python_lib}/config |
---|
259 | %{python_lib}/test |
---|
260 | |
---|
261 | %files tools |
---|
262 | %defattr(-,root,root) |
---|
263 | %{_bindir}/2to3.1 |
---|
264 | %{_bindir}/idle3 |
---|
265 | %{_bindir}/pydoc3 |
---|
266 | %{python_lib}/idlelib |
---|
267 | %{python_lib}/lib2to3 |
---|
268 | %{python_lib}/site-packages |
---|
269 | |
---|
270 | %files tkinter |
---|
271 | %defattr(-,root,root) |
---|
272 | %{python_lib}/tkinter |
---|
273 | %{python_lib}/lib-dynload/_tkinter.so |
---|
274 | |
---|
275 | %files docs |
---|
276 | %defattr(-,root,root) |
---|
277 | %doc Misc/ACKS Misc/HISTORY Misc/NEWS Misc/README |
---|
278 | %doc Misc/cheatsheet Misc/Porting |
---|
279 | %doc Doc/html |
---|
280 | |
---|
281 | |
---|
282 | %changelog |
---|
283 | * Fri Jan 14 2011 Shu KONNO <owa@bg.wakwak.com> 3.1.3-2 |
---|
284 | - rebuilt with openssl-1.0.0c |
---|
285 | |
---|
286 | * Mon Nov 29 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.3-1 |
---|
287 | - updated python to 3.1.3 |
---|
288 | - added python-3.1.3-locale.patch |
---|
289 | - dropt python-3.1.2-lib64.patch |
---|
290 | - added python-3.1.3-lib64-*.patchs |
---|
291 | python-3.1.3-lib64-Makefile.patch |
---|
292 | python-3.1.3-lib64-setup.patch |
---|
293 | python-3.1.3-lib64-site.patch |
---|
294 | python-3.1.3-lib64-install.patch |
---|
295 | python-3.1.3-lib64-sysconfig.patch |
---|
296 | python-3.1.3-lib64-getpath.patch |
---|
297 | python-3.1.3-lib64-test_install.patch |
---|
298 | - added run_test macro to run unit test |
---|
299 | - added BR: libffi |
---|
300 | |
---|
301 | * Sun Sep 26 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-4 |
---|
302 | - rebuilt with rpm-4.8.1 for pkg-config |
---|
303 | |
---|
304 | * Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-3 |
---|
305 | - spec in utf-8 |
---|
306 | |
---|
307 | * Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-2 |
---|
308 | - added missings in BuildRequires, Requires |
---|
309 | |
---|
310 | * Fri Jun 18 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-1 |
---|
311 | - initial build for VineSeed |
---|
312 | |
---|