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

Revision 1222, 6.6 KB checked in by owa, 14 years ago (diff)

spec in utf-8

Line 
1%define TclTk 8.4
2%define pybasever 3.1
3%define python_lib %{_libdir}/python%{pybasever}
4Summary: An interpreted, interactive, object-oriented programming language.
5Summary(ja): オブジェクト指向 Python3 インタプリタ
6Name: python3
7Version: %{pybasever}.2
8Release: 3%{?_dist_release}
9License: Modified CNRI Open Source License
10Group: Development/Languages
11URL: http://www.python.org/download/releases/%{version}
12Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
13Source1: http://docs.python.org/py3k/archives/python-%{version}-docs-html.tar.bz2
14Patch0: python-3.1.2-Setup.dist.patch
15Patch1: python-3.1.2-lib64.patch
16BuildRoot: %{_tmppath}/%{name}-%{version}-root
17Vendor: Project Vine
18Distribution: Vine Linux
19
20BuildRequires: gzip tar gcc-c++ pkgconfig sed findutils
21BuildRequires: bzip2-devel
22BuildRequires: gdbm-devel
23BuildRequires: glibc-devel
24BuildRequires: ncurses-devel
25BuildRequires: openssl-devel
26BuildRequires: readline-devel
27BuildRequires: sqlite3-devel
28BuildRequires: zlib-devel
29Requires: bzip2
30Requires: gdbm
31Requires: ncurses
32Requires: openssl
33Requires: readline
34Requires: sqlite3
35Requires: zlib
36
37%description
38Python is an interpreted, interactive, object-oriented programming
39language often compared to Tcl, Perl, Scheme or Java. Python includes
40modules, classes, exceptions, very high level dynamic data types and
41dynamic typing. Python supports interfaces to many system calls and
42libraries, as well as to various windowing systems (X11, Motif, Tk,
43Mac and MFC).
44
45Programmers can write new built-in modules for Python in C or C++.
46Python can be used as an extension language for applications that need
47a programmable interface. This package contains most of the standard
48Python modules, as well as modules for interfacing to the Tix widget
49set for Tk and RPM.
50
51Note that documentation for Python is provided in the python-docs
52package.
53
54%package devel
55Summary: The libraries and header files needed for Python development.
56Group: Development/Libraries
57
58%description devel
59The Python programming language's interpreter can be extended with
60dynamically loaded extensions and can be embedded in other programs.
61This package contains the header files and libraries needed to do
62these types of tasks.
63
64Install python-devel if you want to develop Python extensions.  The
65python package will also need to be installed.  You'll probably also
66want to install the python-docs package, which contains Python
67documentation.
68
69%package tkinter
70Summary: A graphical user interface for the Python scripting language.
71Group: Development/Languages
72Requires: %{name} = %{version}
73Requires: tcl, tk, tix
74Requires: libX11, libxcb, libXau, libXdmcp
75BuildRequires: tcl, tk, tix
76BuildRequires: libX11-devel, libxcb-devel, libXau-devel, libXdmcp-devel
77
78%description tkinter
79The Tkinter (Tk interface) program is an graphical user interface for
80the Python scripting language.
81
82You should install the tkinter package if you'd like to use a graphical
83user interface for Python programming.
84
85%package tools
86Summary: A collection of development tools included with Python.
87Group: Development/Tools
88Requires: %{name} = %{version}
89Requires: %{name}-tkinter = %{version}
90
91%description tools
92The Python package includes several development tools that are used
93to build python programs.
94
95%package docs
96Summary: Documentation for the Python programming language.
97Group: Documentation
98
99%description docs
100The python-docs package contains documentation on the Python
101programming language and interpreter.  The documentation is provided
102in ASCII text files and in LaTeX source files.
103
104Install the python-docs package if you'd like to use the documentation
105for 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
116pushd Modules
117mv Setup.dist Setup.dist.old
118cat Setup.dist.old \
119        | sed "s^-ltcl^-ltcl%{TclTk}^" \
120        | sed "s^-ltk^-ltk%{TclTk}^" \
121        | sed "s^-ltix^-ltix%{TclTk}^" \
122        > Setup.dist
123rm -f Setup.dist.old
124popd
125
126
127%build
128%configure \
129        --enable-shared \
130        --enable-ipv6 \
131        --enable-profiling \
132        --with-wide-unicode \
133        ;
134make %{?_smp_mflags}
135
136
137%install
138rm -fr $RPM_BUILD_ROOT
139make DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} install
140
141## Clean up the testsuite - we don't need compiled files for it
142find $RPM_BUILD_ROOT%{python_lib}/test \
143    -name "*.pyc" -o -name "*.pyo" | xargs rm -f
144
145chmod 755 $RPM_BUILD_ROOT%{_libdir}/libpython*.so.*
146chmod 755 $RPM_BUILD_ROOT%{python_lib}/lib-dynload/*.so
147find $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
151mkdir -p $RPM_BUILD_ROOT%{python_lib}/bin
152mv $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{python_lib}/bin
153mv $RPM_BUILD_ROOT%{python_lib}/bin/python%{pybasever}* $RPM_BUILD_ROOT%{_bindir}/
154
155## html document
156tar xvzf %SOURCE1
157if [ -d Doc/html ] ; then
158        rm Doc/html
159fi
160mv python-%{version}-docs-html Doc/html
161
162
163%post -p /sbin/ldconfig
164%postun -p /sbin/ldconfig
165%clean
166rm -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 Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-3
232- spec in utf-8
233
234* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-2
235- added missings in BuildRequires, Requires
236
237* Fri Jun 18 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-1
238- initial build for VineSeed
239
Note: See TracBrowser for help on using the repository browser.