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

Revision 11920, 11.4 KB checked in by tomop, 6 years ago (diff)

python3-3.5.6-1

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 libvers 3.5
4%define binsuffix 3.5
5%define python_lib %{_libdir}/python%{libvers}
6%define config_htmldir /var/www/html/python
7Summary: An interpreted, interactive, object-oriented programming language.
8Summary(ja): オブジェクト指向 Python3 インタプリタ
9Name: python3
10Version: 3.5.6
11Release: 1%{?_dist_release}
12License: PSF
13Group: Development/Languages
14URL: http://www.python.org/download/releases/%{version}
15Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
16Source1: https://docs.python.org/3.5/archives/python-%{version}-docs-html.tar.bz2
17Patch1: python-3.5.2-lib64.patch
18Patch2: python3-3.4.4-revert-makefile.patch
19
20BuildRoot: %{_tmppath}/%{name}-%{version}-root
21BuildRequires: expat-devel
22BuildRequires: libdb-devel
23BuildRequires: gdbm-devel
24BuildRequires: sqlite3-devel
25BuildRequires: gzip tar gcc-c++ pkgconfig sed findutils
26BuildRequires: bzip2-devel
27BuildRequires: glibc-devel
28BuildRequires: ncurses-devel
29BuildRequires: openssl-devel
30BuildRequires: readline-devel
31BuildRequires: zlib-devel
32BuildRequires: libffi-devel
33BuildRequires: valgrind-devel
34Requires: bzip2
35Requires: gdbm
36Requires: ncurses
37Requires: openssl
38Requires: readline
39Requires: sqlite3
40Requires: zlib
41
42Packager: owa, Takemikaduchi
43Vendor: Project Vine
44Distribution: Vine Linux
45
46%description
47Python is an interpreted, interactive, object-oriented programming
48language.  It incorporates modules, exceptions, dynamic typing, very high
49level dynamic data types, and classes. Python combines remarkable power
50with very clear syntax. It has interfaces to many system calls and
51libraries, as well as to various window systems, and is extensible in C or
52C++. It is also usable as an extension language for applications that need
53a programmable interface.  Finally, Python is portable: it runs on many
54brands of UNIX, on PCs under Windows, MS-DOS, and OS/2, and on the
55Mac.
56
57%package devel
58Summary: The libraries and header files needed for Python development.
59Group: Development/Libraries
60Requires: %{name} = %{version}-%{release}
61
62%description devel
63The Python programming language's interpreter can be extended with
64dynamically loaded extensions and can be embedded in other programs.
65This package contains the header files and libraries needed to do
66these types of tasks.
67
68Install python-devel if you want to develop Python extensions.  The
69python package will also need to be installed.  You'll probably also
70want to install the python-docs package, which contains Python
71documentation.
72
73%package tkinter
74Summary: A graphical user interface for the Python scripting language.
75Group: Development/Languages
76Requires: %{name} = %{version}-%{release}
77Requires: tcl, tk, tix
78Requires: libX11, libxcb, libXau, libXdmcp
79BuildRequires: tcl-devel, tk-devel, tix
80BuildRequires: libX11-devel, libxcb-devel, libXau-devel, libXdmcp-devel
81
82%description tkinter
83The Tkinter (Tk interface) program is an graphical user interface for
84the Python scripting language.
85
86You should install the tkinter package if you'd like to use a graphical
87user interface for Python programming.
88
89%package tools
90Summary: A collection of development tools included with Python.
91Group: Development/Tools
92Requires: %{name} = %{version}-%{release}
93Requires: %{name}-tkinter = %{version}
94
95%description tools
96The Python package includes several development tools that are used
97to build python programs.
98
99%package docs
100Summary: Documentation for the Python programming language.
101Summary(ja): Python プログラミング言語のドキュメント
102Group: Documentation
103
104%description docs
105The python-docs package contains documentation on the Python
106programming language and interpreter.  The documentation is provided
107in ASCII text files and in LaTeX source files.
108
109Install the python-docs package if you'd like to use the documentation
110for the Python language.
111
112
113%prep
114%setup -q -n Python-%{version}
115%if %{_lib} == lib64
116%patch1 -p1 -b .lib64
117%endif
118%patch2 -p1 -b .libpl
119
120
121%build
122./configure \
123        --prefix=%{_prefix} \
124        --libdir=%{_libdir} \
125        --enable-shared \
126        --enable-ipv6 \
127        --with-fpectl \
128        --with-doc-strings \
129        --with-pymalloc \
130        --with-signal-module \
131        --with-system-ffi \
132        --with-threads \
133        --with-valgrind \
134        --without-ensurepip \
135%ifarch x86_64
136        --with-universal-archs=64-bit \
137%endif
138        CXX=g++;
139
140cat <<EOF >> Modules/Setup.local
141_socket socketmodule.c
142SSL=%{_prefix}
143_ssl _ssl.c \
144       -DUSE_SSL -I%{_includedir} -I%{_includedir}/openssl \
145       -L%{_libdir} -lssl -lcrypto
146EOF
147
148make %{?_smp_mflags}
149
150%if %{run_test}
151make test
152%endif
153
154
155%install
156[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
157echo '[install_scripts]' >setup.cfg
158echo 'install_dir='"${RPM_BUILD_ROOT}%{_bindir}" >> setup.cfg
159
160mkdir -p $RPM_BUILD_ROOT%{python_lib}/lib-dynload
161make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
162
163# if --with-wide-unicode at configure
164ln -s python%{libvers}m $RPM_BUILD_ROOT%{_includedir}/python%{libvers}
165
166# replace path in pydoc
167if [ ! -z "%{binsuffix}" ]
168then
169   (
170      cd $RPM_BUILD_ROOT%{_bindir}
171      mv pydoc%{libvers} pydoc.old
172      sed 's|#!.*|#!%{_bindir}/env python'%{libvers}'|' \
173            pydoc.old > pydoc%{libvers}
174      chmod 755 pydoc%{libvers}
175      rm -f pydoc.old
176   )
177fi
178
179#  Tools
180echo '#!%{_bindir}/env python%{binsuffix}' > ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
181echo 'import os, sys' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
182echo 'os.execvp("%{_bindir}/python%{binsuffix}", ["%{_bindir}/python%{binsuffix}", "%{python_lib}/idlelib/idle.py"] + sys.argv[1:])' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
183echo 'print "Failed to exec Idle"' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
184echo 'sys.exit(1)' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
185chmod 755 $RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix}
186cp -a Tools $RPM_BUILD_ROOT%{python_lib}
187
188# make file lists
189rm -f mainpkg.files
190find "$RPM_BUILD_ROOT"%{python_lib} -type f |
191        sed "s|^${RPM_BUILD_ROOT}|/|" |
192        grep -v -e '/python%{libvers}/config$' -e '_tkinter.so$' >> mainpkg.files
193
194rm -f $RPM_BUILD_ROOT%{_prefix}/bin/2to3
195find "$RPM_BUILD_ROOT""%{_prefix}"/bin -type f -o -type l |
196        sed "s|^${RPM_BUILD_ROOT}|/|" |
197        grep -v -e '/bin/2to3%{binsuffix}$' |
198        grep -v -e '/bin/pydoc%{binsuffix}$' |
199        grep -v -e '/bin/smtpd.py%{binsuffix}$' |
200        grep -v -e '/bin/idle%{binsuffix}$' >> mainpkg.files
201
202
203rm -f tools.files
204find "$RPM_BUILD_ROOT"%{python_lib}/idlelib \
205      "$RPM_BUILD_ROOT"%{python_lib}/Tools -type f |
206      sed "s|^${RPM_BUILD_ROOT}|/|" > tools.files
207echo %{_bindir}/2to3-%{binsuffix} >> tools.files
208echo %{_bindir}/pydoc%{binsuffix} >> tools.files
209##echo %{_bindir}/smtpd.py%{binsuffix} >> tools.files
210echo %{_bindir}/idle%{binsuffix} >> tools.files
211
212# docs
213mkdir -p "$RPM_BUILD_ROOT"%{config_htmldir}
214(
215   cd "$RPM_BUILD_ROOT"%{config_htmldir}
216   bunzip2 < %{SOURCE1} | tar x
217)
218
219#  fix the #! line in installed files
220find "$RPM_BUILD_ROOT" -type f -print0 |
221      xargs -0 grep -l /usr/local/bin/python | while read file
222do
223   FIXFILE="$file"
224   sed 's|^#!.*python|#!%{_bindir}/env python'"%{binsuffix}"'|' \
225         "$FIXFILE" >/tmp/fix-python-path.$$
226   cat /tmp/fix-python-path.$$ > "$FIXFILE"
227   rm -f /tmp/fix-python-path.$$
228done
229
230#  check to see if there are any straggling #! lines
231find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \
232      | grep ':1:#!' >/tmp/python-rpm-files.$$ || true
233if [ -s /tmp/python-rpm-files.$$ ]
234then
235   echo '*****************************************************'
236   cat /tmp/python-rpm-files.$$
237   cat <<@EOF
238   *****************************************************
239     There are still files referencing /usr/local/bin/python in the
240     install directory.  They are listed above.  Please fix the .spec
241     file and try again.  If you are an end-user, you probably want
242     to report this to jafo-rpms@tummy.com as well.
243   *****************************************************
244@EOF
245   rm -f /tmp/python-rpm-files.$$
246   exit 1
247fi
248rm -f /tmp/python-rpm-files.$$
249
250
251%post -p /sbin/ldconfig
252%postun -p /sbin/ldconfig
253%clean
254rm -fr $RPM_BUILD_ROOT
255
256%files -f mainpkg.files
257%defattr(-, root, root)
258%doc LICENSE
259%doc Misc/ACKS Misc/HISTORY Misc/NEWS Misc/Porting Misc/README
260%attr(755,root,root) %dir %{python_lib}/
261%{_libdir}/libpython*
262%{_mandir}/man1/python%{libvers}.1*
263%{_mandir}/man1/%{name}.1*
264
265%files devel
266%defattr(-,root,root)
267%dir %{_includedir}/python%{libvers}m
268%{_includedir}/python%{libvers}m/*.h
269%{_includedir}/python%{libvers}
270%{_libdir}/pkgconfig/*.pc
271
272%files -f tools.files tools
273%defattr(-,root,root)
274
275%files tkinter
276%defattr(-,root,root)
277%{python_lib}/tkinter
278%{python_lib}/lib-dynload/_tkinter.*.so*
279
280%files docs
281%defattr(-,root,root)
282%{config_htmldir}/*
283
284
285%changelog
286* Mon Nov 19 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.6-1
287- new upstream release.
288- really rebuilt with openssl-1.1.1.
289
290* Fri Nov 02 2018 Toshiaki Ara <ara_t@384.jp> 3.5.2-2
291- rebuild with openssl-1.1.1
292
293* Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.2-1
294- new upstream release
295- update Patch1 (python-3.5.2-lib64.patch)
296
297* Sun Mar 27 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-2
298- rebuild with openssl-1.0.2g
299
300* Sat Feb 13 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-1
301- new upstream release
302- add Patch2 (python3-3.4.4-revert-makefile.patch)
303
304* Sun Apr 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.3-1
305- new upstream release
306
307* Sun Mar 22 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.4.2-2
308- rebuilt with readline 6.3
309- changed BuildRequires: tcl-devel, tk-devel instead of tcl, tk respectively
310- changed BuildRequires: libdb-devel instead of db4-devel
311
312* Sun Jan 11 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-1
313- new upstream release
314- update Patch1 (python-3.4.2-lib64.patch)
315
316* Sun Sep 07 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-3
317- remove configure option "--enable-profiling"
318
319* Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-2
320- rebuild with libffi-3.0.13
321
322* Sun Nov 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-1
323- new upstream release
324
325* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.2-1
326- updated python to 3.3.2
327
328* Sun Jan  6 2013 IWAI, Masaharu <iwai@alib.jp> 3.3.0-2
329- build with Tcl/Tk 8.5.7-1
330
331* Wed Oct 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.0-1
332- updated python to 3.3.0
333- update Patch1 (python-3.3.0-lib64.patch)
334- add BuildRequires: valgrind-devel
335
336* Sat Apr 16 2011 Shu KONNO <owa@bg.wakwak.com> 3.2-1
337- updated python to 3.2
338- updated python-*-docs-html to 3.2
339- dropt all patchs
340- added python-3.2b2-lib64.patch
341- referred to the review Python-3.2/Misc/RPM/python-3.2.spec
342
343* Fri Jan 14 2011 Shu KONNO <owa@bg.wakwak.com> 3.1.3-2
344- rebuilt with openssl-1.0.0c
345
346* Mon Nov 29 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.3-1
347- updated python to 3.1.3
348- added python-3.1.3-locale.patch
349- dropt python-3.1.2-lib64.patch
350- added python-3.1.3-lib64-*.patchs
351  python-3.1.3-lib64-Makefile.patch
352  python-3.1.3-lib64-setup.patch
353  python-3.1.3-lib64-site.patch
354  python-3.1.3-lib64-install.patch
355  python-3.1.3-lib64-sysconfig.patch
356  python-3.1.3-lib64-getpath.patch
357  python-3.1.3-lib64-test_install.patch
358- added run_test macro to run unit test
359- added BR: libffi
360
361* Sun Sep 26 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-4
362- rebuilt with rpm-4.8.1 for pkg-config
363
364* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-3
365- spec in utf-8
366
367* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-2
368- added missings in BuildRequires, Requires
369
370* Fri Jun 18 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-1
371- initial build for VineSeed
372
Note: See TracBrowser for help on using the repository browser.