source: projects/specs/trunk/p/python3/python3-vl.spec @ 2500

Revision 2500, 9.1 KB checked in by owa, 13 years ago (diff)

rebuilt with openssl-1.0.0c

Line 
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}
6Summary: An interpreted, interactive, object-oriented programming language.
7Summary(ja): オブジェクト指向 Python3 インタプリタ
8Name: python3
9Version: %{pybasever}.3
10Release: 2%{?_dist_release}
11License: Modified CNRI Open Source License
12Group: Development/Languages
13URL: http://www.python.org/download/releases/%{version}
14Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
15Source1: http://docs.python.org/py3k/archives/python-%{version}-docs-html.tar.bz2
16Patch0: python-3.1.3-Setup.dist.patch
17Patch10: python-3.1.3-locale.patch
18Patch100: python-3.1.3-lib64-Makefile.patch
19Patch101: python-3.1.3-lib64-setup.patch
20Patch102: python-3.1.3-lib64-site.patch
21Patch103: python-3.1.3-lib64-install.patch
22Patch104: python-3.1.3-lib64-sysconfig.patch
23Patch105: python-3.1.3-lib64-getpath.patch
24Patch106: python-3.1.3-lib64-test_install.patch
25BuildRoot: %{_tmppath}/%{name}-%{version}-root
26BuildRequires: gzip tar gcc-c++ pkgconfig sed findutils
27BuildRequires: bzip2-devel
28BuildRequires: gdbm-devel
29BuildRequires: glibc-devel
30BuildRequires: ncurses-devel
31BuildRequires: openssl-devel
32BuildRequires: readline-devel
33BuildRequires: sqlite3-devel
34BuildRequires: zlib-devel
35BuildRequires: libffi-devel
36Requires: bzip2
37Requires: gdbm
38Requires: ncurses
39Requires: openssl
40Requires: readline
41Requires: sqlite3
42Requires: zlib
43Packager: owa
44Vendor: Project Vine
45Distribution: Vine Linux
46
47%description
48Python is an interpreted, interactive, object-oriented programming
49language often compared to Tcl, Perl, Scheme or Java. Python includes
50modules, classes, exceptions, very high level dynamic data types and
51dynamic typing. Python supports interfaces to many system calls and
52libraries, as well as to various windowing systems (X11, Motif, Tk,
53Mac and MFC).
54
55Programmers can write new built-in modules for Python in C or C++.
56Python can be used as an extension language for applications that need
57a programmable interface. This package contains most of the standard
58Python modules, as well as modules for interfacing to the Tix widget
59set for Tk and RPM.
60
61Note that documentation for Python is provided in the python-docs
62package.
63
64%package devel
65Summary: The libraries and header files needed for Python development.
66Group: Development/Libraries
67
68%description devel
69The Python programming language's interpreter can be extended with
70dynamically loaded extensions and can be embedded in other programs.
71This package contains the header files and libraries needed to do
72these types of tasks.
73
74Install python-devel if you want to develop Python extensions.  The
75python package will also need to be installed.  You'll probably also
76want to install the python-docs package, which contains Python
77documentation.
78
79%package tkinter
80Summary: A graphical user interface for the Python scripting language.
81Group: Development/Languages
82Requires: %{name} = %{version}
83Requires: tcl, tk, tix
84Requires: libX11, libxcb, libXau, libXdmcp
85BuildRequires: tcl, tk, tix
86BuildRequires: libX11-devel, libxcb-devel, libXau-devel, libXdmcp-devel
87
88%description tkinter
89The Tkinter (Tk interface) program is an graphical user interface for
90the Python scripting language.
91
92You should install the tkinter package if you'd like to use a graphical
93user interface for Python programming.
94
95%package tools
96Summary: A collection of development tools included with Python.
97Group: Development/Tools
98Requires: %{name} = %{version}
99Requires: %{name}-tkinter = %{version}
100
101%description tools
102The Python package includes several development tools that are used
103to build python programs.
104
105%package docs
106Summary: Documentation for the Python programming language.
107Group: Documentation
108
109%description docs
110The python-docs package contains documentation on the Python
111programming language and interpreter.  The documentation is provided
112in ASCII text files and in LaTeX source files.
113
114Install the python-docs package if you'd like to use the documentation
115for 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
134pushd Modules
135mv Setup.dist Setup.dist.old
136cat Setup.dist.old \
137        | sed "s^-ltcl^-ltcl%{TclTk}^" \
138        | sed "s^-ltk^-ltk%{TclTk}^" \
139        | sed "s^-ltix^-ltix%{TclTk}^" \
140        > Setup.dist
141rm -f Setup.dist.old
142popd
143
144
145%build
146topdir=`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        ;
155make %{?_smp_mflags}
156
157## rebuild with new python
158export LD_LIBRARY_PATH=$topdir
159export PATH="$topdir:$PATH"
160ln -s $topdir/python $topdir/python%{pybasever}
161#$topdir/python Tools/scripts/pathfix.py -i "/usr/bin/env python%{pybasever}" .
162make %{?_smp_mflags}
163
164%if %{run_test}
165#%%check
166find ./Lib -name '*.py[co]' -print | xargs rm -f
167LD_LIBRARY_PATH=$topdir:$topdir/Modules:$topdir/build/lib.linux-%{_host_cpu}-%{pybasever}
168PYTHONHOME=$topdir
169PYTHONPATH=$topdir/Lib:$topdir/Lib/test:$topdir/Lib/lib-tk:$topdir/Lib/site-packages
170PYTHONPATH=$PYTHONPATH:$LD_LIBRARY_PATH
171export PYTHONHOME PYTHONPATH LD_LIBRARY_PATH
172SKIPLIST="-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
190rm -fr $RPM_BUILD_ROOT
191make DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} install
192
193## Clean up the testsuite - we don't need compiled files for it
194find $RPM_BUILD_ROOT%{python_lib}/test \
195    -name "*.pyc" -o -name "*.pyo" | xargs rm -f
196
197chmod 755 $RPM_BUILD_ROOT%{_libdir}/libpython*.so.*
198chmod 755 $RPM_BUILD_ROOT%{python_lib}/lib-dynload/*.so
199find $RPM_BUILD_ROOT%{python_lib} -perm -o=x -name '*.py' | xargs chmod -x
200mv $RPM_BUILD_ROOT%{_bindir}/2to3 $RPM_BUILD_ROOT%{_bindir}/2to3.1
201
202
203## html document
204tar xvzf %SOURCE1
205if [ -d Doc/html ] ; then
206        rm -r Doc/html
207fi
208mv python-%{version}-docs-html Doc/html
209
210
211%post -p /sbin/ldconfig
212%postun -p /sbin/ldconfig
213%clean
214rm -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
Note: See TracBrowser for help on using the repository browser.