1 | %define TclTk 8.4 |
---|
2 | %define pybasever 3.1 |
---|
3 | %define python_lib %{_libdir}/python%{pybasever} |
---|
4 | Summary: An interpreted, interactive, object-oriented programming language. |
---|
5 | Summary(ja): オブジェクト指向 Python3 インタプリタ |
---|
6 | Name: python3 |
---|
7 | Version: %{pybasever}.2 |
---|
8 | Release: 4%{?_dist_release} |
---|
9 | License: Modified CNRI Open Source License |
---|
10 | Group: Development/Languages |
---|
11 | URL: http://www.python.org/download/releases/%{version} |
---|
12 | Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2 |
---|
13 | Source1: http://docs.python.org/py3k/archives/python-%{version}-docs-html.tar.bz2 |
---|
14 | Patch0: python-3.1.2-Setup.dist.patch |
---|
15 | Patch1: python-3.1.2-lib64.patch |
---|
16 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
17 | Vendor: Project Vine |
---|
18 | Distribution: Vine Linux |
---|
19 | |
---|
20 | BuildRequires: gzip tar gcc-c++ pkgconfig sed findutils |
---|
21 | BuildRequires: bzip2-devel |
---|
22 | BuildRequires: gdbm-devel |
---|
23 | BuildRequires: glibc-devel |
---|
24 | BuildRequires: ncurses-devel |
---|
25 | BuildRequires: openssl-devel |
---|
26 | BuildRequires: readline-devel |
---|
27 | BuildRequires: sqlite3-devel |
---|
28 | BuildRequires: zlib-devel |
---|
29 | Requires: bzip2 |
---|
30 | Requires: gdbm |
---|
31 | Requires: ncurses |
---|
32 | Requires: openssl |
---|
33 | Requires: readline |
---|
34 | Requires: sqlite3 |
---|
35 | Requires: zlib |
---|
36 | |
---|
37 | %description |
---|
38 | Python is an interpreted, interactive, object-oriented programming |
---|
39 | language often compared to Tcl, Perl, Scheme or Java. Python includes |
---|
40 | modules, classes, exceptions, very high level dynamic data types and |
---|
41 | dynamic typing. Python supports interfaces to many system calls and |
---|
42 | libraries, as well as to various windowing systems (X11, Motif, Tk, |
---|
43 | Mac and MFC). |
---|
44 | |
---|
45 | Programmers can write new built-in modules for Python in C or C++. |
---|
46 | Python can be used as an extension language for applications that need |
---|
47 | a programmable interface. This package contains most of the standard |
---|
48 | Python modules, as well as modules for interfacing to the Tix widget |
---|
49 | set for Tk and RPM. |
---|
50 | |
---|
51 | Note that documentation for Python is provided in the python-docs |
---|
52 | package. |
---|
53 | |
---|
54 | %package devel |
---|
55 | Summary: The libraries and header files needed for Python development. |
---|
56 | Group: Development/Libraries |
---|
57 | |
---|
58 | %description devel |
---|
59 | The Python programming language's interpreter can be extended with |
---|
60 | dynamically loaded extensions and can be embedded in other programs. |
---|
61 | This package contains the header files and libraries needed to do |
---|
62 | these types of tasks. |
---|
63 | |
---|
64 | Install python-devel if you want to develop Python extensions. The |
---|
65 | python package will also need to be installed. You'll probably also |
---|
66 | want to install the python-docs package, which contains Python |
---|
67 | documentation. |
---|
68 | |
---|
69 | %package tkinter |
---|
70 | Summary: A graphical user interface for the Python scripting language. |
---|
71 | Group: Development/Languages |
---|
72 | Requires: %{name} = %{version} |
---|
73 | Requires: tcl, tk, tix |
---|
74 | Requires: libX11, libxcb, libXau, libXdmcp |
---|
75 | BuildRequires: tcl, tk, tix |
---|
76 | BuildRequires: libX11-devel, libxcb-devel, libXau-devel, libXdmcp-devel |
---|
77 | |
---|
78 | %description tkinter |
---|
79 | The Tkinter (Tk interface) program is an graphical user interface for |
---|
80 | the Python scripting language. |
---|
81 | |
---|
82 | You should install the tkinter package if you'd like to use a graphical |
---|
83 | user interface for Python programming. |
---|
84 | |
---|
85 | %package tools |
---|
86 | Summary: A collection of development tools included with Python. |
---|
87 | Group: Development/Tools |
---|
88 | Requires: %{name} = %{version} |
---|
89 | Requires: %{name}-tkinter = %{version} |
---|
90 | |
---|
91 | %description tools |
---|
92 | The Python package includes several development tools that are used |
---|
93 | to build python programs. |
---|
94 | |
---|
95 | %package docs |
---|
96 | Summary: Documentation for the Python programming language. |
---|
97 | Group: Documentation |
---|
98 | |
---|
99 | %description docs |
---|
100 | The python-docs package contains documentation on the Python |
---|
101 | programming language and interpreter. The documentation is provided |
---|
102 | in ASCII text files and in LaTeX source files. |
---|
103 | |
---|
104 | Install the python-docs package if you'd like to use the documentation |
---|
105 | for the Python language. |
---|
106 | |
---|
107 | |
---|
108 | %prep |
---|
109 | %setup -q -n Python-%{version} |
---|
110 | %patch0 -p1 -b .Setup |
---|
111 | %if %{_lib} == lib64 |
---|
112 | %patch1 -p1 -b .lib64 |
---|
113 | %endif |
---|
114 | |
---|
115 | # fix library names |
---|
116 | pushd Modules |
---|
117 | mv Setup.dist Setup.dist.old |
---|
118 | cat Setup.dist.old \ |
---|
119 | | sed "s^-ltcl^-ltcl%{TclTk}^" \ |
---|
120 | | sed "s^-ltk^-ltk%{TclTk}^" \ |
---|
121 | | sed "s^-ltix^-ltix%{TclTk}^" \ |
---|
122 | > Setup.dist |
---|
123 | rm -f Setup.dist.old |
---|
124 | popd |
---|
125 | |
---|
126 | |
---|
127 | %build |
---|
128 | %configure \ |
---|
129 | --enable-shared \ |
---|
130 | --enable-ipv6 \ |
---|
131 | --enable-profiling \ |
---|
132 | --with-wide-unicode \ |
---|
133 | ; |
---|
134 | make %{?_smp_mflags} |
---|
135 | |
---|
136 | |
---|
137 | %install |
---|
138 | rm -fr $RPM_BUILD_ROOT |
---|
139 | make DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} install |
---|
140 | |
---|
141 | ## Clean up the testsuite - we don't need compiled files for it |
---|
142 | find $RPM_BUILD_ROOT%{python_lib}/test \ |
---|
143 | -name "*.pyc" -o -name "*.pyo" | xargs rm -f |
---|
144 | |
---|
145 | chmod 755 $RPM_BUILD_ROOT%{_libdir}/libpython*.so.* |
---|
146 | chmod 755 $RPM_BUILD_ROOT%{python_lib}/lib-dynload/*.so |
---|
147 | find $RPM_BUILD_ROOT%{python_lib} -perm -o=x -name '*.py' | xargs chmod -x |
---|
148 | #mv $RPM_BUILD_ROOT%{_mandir}/man1/python.1 $RPM_BUILD_ROOT%{_mandir}/man1/python3.1 |
---|
149 | |
---|
150 | ## move files conflict with python2 |
---|
151 | mkdir -p $RPM_BUILD_ROOT%{python_lib}/bin |
---|
152 | mv $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{python_lib}/bin |
---|
153 | mv $RPM_BUILD_ROOT%{python_lib}/bin/python%{pybasever}* $RPM_BUILD_ROOT%{_bindir}/ |
---|
154 | |
---|
155 | ## html document |
---|
156 | tar xvzf %SOURCE1 |
---|
157 | if [ -d Doc/html ] ; then |
---|
158 | rm Doc/html |
---|
159 | fi |
---|
160 | mv python-%{version}-docs-html Doc/html |
---|
161 | |
---|
162 | |
---|
163 | %post -p /sbin/ldconfig |
---|
164 | %postun -p /sbin/ldconfig |
---|
165 | %clean |
---|
166 | rm -fr $RPM_BUILD_ROOT |
---|
167 | |
---|
168 | %files |
---|
169 | %defattr(-, root, root) |
---|
170 | %doc LICENSE README |
---|
171 | %{_bindir}/python%{pybasever} |
---|
172 | %{_bindir}/python%{pybasever}-config |
---|
173 | %{_libdir}/libpython%{pybasever}.so* |
---|
174 | %{_libdir}/pkgconfig/python-%{pybasever}.pc |
---|
175 | %{_libdir}/pkgconfig/python3.pc |
---|
176 | %{_mandir}/man1/* |
---|
177 | %dir %{python_lib} |
---|
178 | %dir %{python_lib}/site-packages |
---|
179 | %{python_lib}/LICENSE.txt |
---|
180 | %{python_lib}/*.py* |
---|
181 | %{python_lib}/*.doc |
---|
182 | %{python_lib}/ctypes |
---|
183 | %{python_lib}/curses |
---|
184 | %{python_lib}/distutils |
---|
185 | %{python_lib}/dbm |
---|
186 | %{python_lib}/email |
---|
187 | %{python_lib}/encodings |
---|
188 | %{python_lib}/html |
---|
189 | %{python_lib}/http |
---|
190 | %{python_lib}/importlib |
---|
191 | %{python_lib}/json |
---|
192 | %{python_lib}/logging |
---|
193 | %{python_lib}/multiprocessing |
---|
194 | %{python_lib}/plat-linux2 |
---|
195 | %{python_lib}/pydoc_data |
---|
196 | %{python_lib}/sqlite3 |
---|
197 | %{python_lib}/urllib |
---|
198 | %{python_lib}/wsgiref |
---|
199 | %{python_lib}/wsgiref.egg-info |
---|
200 | %{python_lib}/xml |
---|
201 | %{python_lib}/xmlrpc |
---|
202 | %{python_lib}/lib-dynload |
---|
203 | %exclude %{python_lib}/lib-dynload/_tkinter.so |
---|
204 | |
---|
205 | %files devel |
---|
206 | %defattr(-,root,root) |
---|
207 | %{_includedir}/python%{pybasever} |
---|
208 | %{python_lib}/config |
---|
209 | %{python_lib}/test |
---|
210 | |
---|
211 | %files tools |
---|
212 | %defattr(-,root,root) |
---|
213 | %{python_lib}/bin |
---|
214 | %{python_lib}/idlelib |
---|
215 | %{python_lib}/lib2to3 |
---|
216 | %{python_lib}/site-packages |
---|
217 | |
---|
218 | %files tkinter |
---|
219 | %defattr(-,root,root) |
---|
220 | %{python_lib}/tkinter |
---|
221 | %{python_lib}/lib-dynload/_tkinter.so |
---|
222 | |
---|
223 | %files docs |
---|
224 | %defattr(-,root,root) |
---|
225 | %doc Misc/ACKS Misc/HISTORY Misc/NEWS Misc/README |
---|
226 | %doc Misc/cheatsheet Misc/Porting |
---|
227 | %doc Doc/html |
---|
228 | |
---|
229 | |
---|
230 | %changelog |
---|
231 | * Sun Sep 26 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-4 |
---|
232 | - rebuilt with rpm-4.8.1 for pkg-config |
---|
233 | |
---|
234 | * Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-3 |
---|
235 | - spec in utf-8 |
---|
236 | |
---|
237 | * Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-2 |
---|
238 | - added missings in BuildRequires, Requires |
---|
239 | |
---|
240 | * Fri Jun 18 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-1 |
---|
241 | - initial build for VineSeed |
---|
242 | |
---|