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

Revision 12236, 12.4 KB checked in by tomop, 5 years ago (diff)

updated 8 packages

expect-5.45.4-1

postgresql-12.0-1

python-2.7.16-4

python3-3.5.7-3

rp-pppoe-3.13-3

tcl-8.6.9-1

tix-8.4.3-4

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