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

Revision 12028, 11.5 KB checked in by tomop, 5 years ago (diff)

python3-3.5.6-2

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