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

Revision 11827, 11.1 KB checked in by ara_t, 6 years ago (diff)

rebuild with openssl-1.1.1

RevLine 
[2238]1# if you wanna test, add " --define '_run_test 1' " option to rpmbuild command
2%define run_test %{?_run_test:1}%{!?_run_test:0}
[10405]3%define libvers 3.5
4%define binsuffix 3.5
[3491]5%define python_lib %{_libdir}/python%{libvers}
6%define config_htmldir /var/www/html/python
[1216]7Summary: An interpreted, interactive, object-oriented programming language.
[1222]8Summary(ja): オブジェクト指向 Python3 インタプリタ
[1216]9Name: python3
[10405]10Version: 3.5.2
[11827]11Release: 2%{?_dist_release}
[3491]12License: PSF
[1216]13Group: Development/Languages
14URL: http://www.python.org/download/releases/%{version}
[7938]15Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
[10405]16Source1: https://docs.python.org/3.5/archives/python-%{version}-docs-html.tar.bz2
17Patch1: python-3.5.2-lib64.patch
[10025]18Patch2: python3-3.4.4-revert-makefile.patch
19
[1216]20BuildRoot: %{_tmppath}/%{name}-%{version}-root
[3491]21BuildRequires: expat-devel
[9461]22BuildRequires: libdb-devel
[3491]23BuildRequires: gdbm-devel
24BuildRequires: sqlite3-devel
[1221]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
[2238]32BuildRequires: libffi-devel
[6985]33BuildRequires: valgrind-devel
[1221]34Requires: bzip2
35Requires: gdbm
36Requires: ncurses
37Requires: openssl
38Requires: readline
39Requires: sqlite3
40Requires: zlib
[7938]41
[8011]42Packager: owa, Takemikaduchi
[2238]43Vendor: Project Vine
44Distribution: Vine Linux
[1221]45
[1216]46%description
47Python is an interpreted, interactive, object-oriented programming
[3491]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.
[1216]56
57%package devel
58Summary: The libraries and header files needed for Python development.
59Group: Development/Libraries
[7938]60Requires: %{name} = %{version}-%{release}
[1216]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
[7938]76Requires: %{name} = %{version}-%{release}
[1221]77Requires: tcl, tk, tix
78Requires: libX11, libxcb, libXau, libXdmcp
[9461]79BuildRequires: tcl-devel, tk-devel, tix
[1221]80BuildRequires: libX11-devel, libxcb-devel, libXau-devel, libXdmcp-devel
[1216]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
[7938]92Requires: %{name} = %{version}-%{release}
[1216]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.
[9461]101Summary(ja): Python プログラミング言語のドキュメント
[1216]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
[3491]116%patch1 -p1 -b .lib64
[1216]117%endif
[10025]118%patch2 -p1 -b .libpl
[1216]119
120
121%build
[3491]122./configure \
123        --prefix=%{_prefix} \
124        --libdir=%{_libdir} \
[1216]125        --enable-shared \
[3491]126        --enable-ipv6 \
127        --with-fpectl \
128        --with-doc-strings \
129        --with-pymalloc \
[2238]130        --with-signal-module \
[3491]131        --with-system-ffi \
132        --with-threads \
133        --with-valgrind \
[9249]134        --without-ensurepip \
[3491]135%ifarch x86_64
136        --with-universal-archs=64-bit \
137%endif
138        CXX=g++;
[1216]139
[2238]140make %{?_smp_mflags}
[1216]141
[2238]142%if %{run_test}
[3491]143make test
[2238]144%endif
145
146
[1216]147%install
[3491]148[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
149echo '[install_scripts]' >setup.cfg
150echo 'install_dir='"${RPM_BUILD_ROOT}%{_bindir}" >> setup.cfg
[1216]151
[3491]152mkdir -p $RPM_BUILD_ROOT%{python_lib}/lib-dynload
153make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
[1216]154
[3491]155# if --with-wide-unicode at configure
[9249]156ln -s python%{libvers}m $RPM_BUILD_ROOT%{_includedir}/python%{libvers}
[1216]157
[3491]158# replace path in pydoc
159if [ ! -z "%{binsuffix}" ]
160then
161   (
162      cd $RPM_BUILD_ROOT%{_bindir}
163      mv pydoc%{libvers} pydoc.old
164      sed 's|#!.*|#!%{_bindir}/env python'%{libvers}'|' \
165            pydoc.old > pydoc%{libvers}
166      chmod 755 pydoc%{libvers}
167      rm -f pydoc.old
168   )
169fi
[1216]170
[3491]171#  Tools
172echo '#!%{_bindir}/env python%{binsuffix}' > ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
173echo 'import os, sys' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
174echo 'os.execvp("%{_bindir}/python%{binsuffix}", ["%{_bindir}/python%{binsuffix}", "%{python_lib}/idlelib/idle.py"] + sys.argv[1:])' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
175echo 'print "Failed to exec Idle"' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
176echo 'sys.exit(1)' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
177chmod 755 $RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix}
178cp -a Tools $RPM_BUILD_ROOT%{python_lib}
179
180# make file lists
181rm -f mainpkg.files
182find "$RPM_BUILD_ROOT"%{python_lib} -type f |
183        sed "s|^${RPM_BUILD_ROOT}|/|" |
184        grep -v -e '/python%{libvers}/config$' -e '_tkinter.so$' >> mainpkg.files
185
186rm -f $RPM_BUILD_ROOT%{_prefix}/bin/2to3
187find "$RPM_BUILD_ROOT""%{_prefix}"/bin -type f -o -type l |
188        sed "s|^${RPM_BUILD_ROOT}|/|" |
189        grep -v -e '/bin/2to3%{binsuffix}$' |
190        grep -v -e '/bin/pydoc%{binsuffix}$' |
191        grep -v -e '/bin/smtpd.py%{binsuffix}$' |
192        grep -v -e '/bin/idle%{binsuffix}$' >> mainpkg.files
193
194
195rm -f tools.files
196find "$RPM_BUILD_ROOT"%{python_lib}/idlelib \
197      "$RPM_BUILD_ROOT"%{python_lib}/Tools -type f |
198      sed "s|^${RPM_BUILD_ROOT}|/|" > tools.files
199echo %{_bindir}/2to3-%{binsuffix} >> tools.files
200echo %{_bindir}/pydoc%{binsuffix} >> tools.files
201##echo %{_bindir}/smtpd.py%{binsuffix} >> tools.files
202echo %{_bindir}/idle%{binsuffix} >> tools.files
203
204# docs
205mkdir -p "$RPM_BUILD_ROOT"%{config_htmldir}
206(
207   cd "$RPM_BUILD_ROOT"%{config_htmldir}
208   bunzip2 < %{SOURCE1} | tar x
209)
210
211#  fix the #! line in installed files
212find "$RPM_BUILD_ROOT" -type f -print0 |
213      xargs -0 grep -l /usr/local/bin/python | while read file
214do
215   FIXFILE="$file"
216   sed 's|^#!.*python|#!%{_bindir}/env python'"%{binsuffix}"'|' \
217         "$FIXFILE" >/tmp/fix-python-path.$$
218   cat /tmp/fix-python-path.$$ > "$FIXFILE"
219   rm -f /tmp/fix-python-path.$$
220done
221
222#  check to see if there are any straggling #! lines
223find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \
224      | grep ':1:#!' >/tmp/python-rpm-files.$$ || true
225if [ -s /tmp/python-rpm-files.$$ ]
226then
227   echo '*****************************************************'
228   cat /tmp/python-rpm-files.$$
229   cat <<@EOF
230   *****************************************************
231     There are still files referencing /usr/local/bin/python in the
232     install directory.  They are listed above.  Please fix the .spec
233     file and try again.  If you are an end-user, you probably want
234     to report this to jafo-rpms@tummy.com as well.
235   *****************************************************
236@EOF
237   rm -f /tmp/python-rpm-files.$$
238   exit 1
[1216]239fi
[3491]240rm -f /tmp/python-rpm-files.$$
[1216]241
242
243%post -p /sbin/ldconfig
244%postun -p /sbin/ldconfig
245%clean
246rm -fr $RPM_BUILD_ROOT
247
[3491]248%files -f mainpkg.files
[1216]249%defattr(-, root, root)
[3491]250%doc LICENSE
251%doc Misc/ACKS Misc/HISTORY Misc/NEWS Misc/Porting Misc/README
252%attr(755,root,root) %dir %{python_lib}/
253%{_libdir}/libpython*
254%{_mandir}/man1/python%{libvers}.1*
[7938]255%{_mandir}/man1/%{name}.1*
[1216]256
257%files devel
258%defattr(-,root,root)
[6985]259%dir %{_includedir}/python%{libvers}m
260%{_includedir}/python%{libvers}m/*.h
[3491]261%{_includedir}/python%{libvers}
262%{_libdir}/pkgconfig/*.pc
[1216]263
[3491]264%files -f tools.files tools
[1216]265%defattr(-,root,root)
266
267%files tkinter
268%defattr(-,root,root)
269%{python_lib}/tkinter
[3491]270%{python_lib}/lib-dynload/_tkinter.*.so*
[1216]271
272%files docs
273%defattr(-,root,root)
[3491]274%{config_htmldir}/*
[1216]275
276
277%changelog
[11827]278* Fri Nov 02 2018 Toshiaki Ara <ara_t@384.jp> 3.5.2-2
279- rebuild with openssl-1.1.1
280
[10405]281* Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.2-1
282- new upstream release
283- update Patch1 (python-3.5.2-lib64.patch)
284
[10101]285* Sun Mar 27 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-2
286- rebuild with openssl-1.0.2g
287
[10025]288* Sat Feb 13 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-1
289- new upstream release
290- add Patch2 (python3-3.4.4-revert-makefile.patch)
291
[9502]292* Sun Apr 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.3-1
293- new upstream release
294
[9461]295* Sun Mar 22 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.4.2-2
296- rebuilt with readline 6.3
297- changed BuildRequires: tcl-devel, tk-devel instead of tcl, tk respectively
298- changed BuildRequires: libdb-devel instead of db4-devel
299
[9249]300* Sun Jan 11 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-1
301- new upstream release
302- update Patch1 (python-3.4.2-lib64.patch)
303
[8940]304* Sun Sep 07 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-3
305- remove configure option "--enable-profiling"
306
[8758]307* Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-2
308- rebuild with libffi-3.0.13
309
[8011]310* Sun Nov 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-1
311- new upstream release
312
[7938]313* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.2-1
314- updated python to 3.3.2
315
[7297]316* Sun Jan  6 2013 IWAI, Masaharu <iwai@alib.jp> 3.3.0-2
317- build with Tcl/Tk 8.5.7-1
318
[6985]319* Wed Oct 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.0-1
320- updated python to 3.3.0
321- update Patch1 (python-3.3.0-lib64.patch)
322- add BuildRequires: valgrind-devel
323
[3491]324* Sat Apr 16 2011 Shu KONNO <owa@bg.wakwak.com> 3.2-1
325- updated python to 3.2
326- updated python-*-docs-html to 3.2
327- dropt all patchs
328- added python-3.2b2-lib64.patch
329- referred to the review Python-3.2/Misc/RPM/python-3.2.spec
330
[2500]331* Fri Jan 14 2011 Shu KONNO <owa@bg.wakwak.com> 3.1.3-2
332- rebuilt with openssl-1.0.0c
333
[2238]334* Mon Nov 29 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.3-1
335- updated python to 3.1.3
336- added python-3.1.3-locale.patch
337- dropt python-3.1.2-lib64.patch
338- added python-3.1.3-lib64-*.patchs
339  python-3.1.3-lib64-Makefile.patch
340  python-3.1.3-lib64-setup.patch
341  python-3.1.3-lib64-site.patch
342  python-3.1.3-lib64-install.patch
343  python-3.1.3-lib64-sysconfig.patch
344  python-3.1.3-lib64-getpath.patch
345  python-3.1.3-lib64-test_install.patch
346- added run_test macro to run unit test
347- added BR: libffi
348
[1902]349* Sun Sep 26 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-4
350- rebuilt with rpm-4.8.1 for pkg-config
351
[1222]352* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-3
353- spec in utf-8
354
[1221]355* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-2
356- added missings in BuildRequires, Requires
357
[1216]358* Fri Jun 18 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-1
359- initial build for VineSeed
360
Note: See TracBrowser for help on using the repository browser.