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

Revision 12376, 12.7 KB checked in by tomop, 4 years ago (diff)

updated 19 packages

g-wrap-1.9.15-2

gjs-1.54.3-2

glib2-2.64.2-2

gobject-introspection-1.64.1-1

guile-2.2.7-1

guile20-2.0.14-5

hardinfo-0.5.1-4

llvm-10.0.0-2

libffi-3.3-1

libffi321-3.2.1-1

p11-kit-0.23.20-2

pycairo-1.18.2-1

pygobject-2.28.6-7

pygobject3-3.34.0-1

python-cffi-1.14.0-1

python-2.7.17-1

python3-3.5.9-1

ruby-2.6.6-2

uim-1.8.8-3

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.9
11Release: 1%{?_dist_release}
12Group: Development/Languages
13Vendor: Project Vine
14Distribution: Vine Linux
15
16License: PSF
17URL: http://www.python.org/download/releases/%{version}
18Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
19Source1: https://docs.python.org/ftp/python/doc/%{version}/python-%{version}-docs-html.tar.bz2
20Patch1: python-3.5.2-lib64.patch
21Patch2: python3-3.4.4-revert-makefile.patch
22
23BuildRoot: %{_tmppath}/%{name}-%{version}-root
24BuildRequires: gzip tar gcc-c++ pkgconfig sed findutils
25BuildRequires: bzip2-devel
26BuildRequires: expat-devel
27BuildRequires: gdbm-devel
28BuildRequires: glibc-devel
29BuildRequires: libdb-devel
30BuildRequires: libffi-devel
31BuildRequires: libnsl2-devel
32BuildRequires: libtirpc-devel
33BuildRequires: libxcrypt-devel
34BuildRequires: ncurses-devel
35BuildRequires: openssl-devel
36BuildRequires: readline-devel
37BuildRequires: sqlite3-devel
38BuildRequires: valgrind-devel
39BuildRequires: zlib-devel
40Requires: bzip2
41Requires: gdbm
42Requires: ncurses
43Requires: openssl
44Requires: readline
45Requires: sqlite3
46Requires: zlib
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 \
202                -e '/python%{libvers}/config$' \
203                -e '_tkinter.so$' \
204                -e '_tkinter.cpython-' \
205                >> mainpkg.files
206
207rm -f $RPM_BUILD_ROOT%{_prefix}/bin/2to3
208find "$RPM_BUILD_ROOT""%{_prefix}"/bin -type f -o -type l |
209        sed "s|^${RPM_BUILD_ROOT}|/|" |
210        grep -v -e '/bin/2to3%{binsuffix}$' |
211        grep -v -e '/bin/pydoc%{binsuffix}$' |
212        grep -v -e '/bin/smtpd.py%{binsuffix}$' |
213        grep -v -e '/bin/idle%{binsuffix}$' >> mainpkg.files
214
215
216rm -f tools.files
217find "$RPM_BUILD_ROOT"%{python_lib}/idlelib \
218      "$RPM_BUILD_ROOT"%{python_lib}/Tools -type f |
219      sed "s|^${RPM_BUILD_ROOT}|/|" > tools.files
220echo %{_bindir}/2to3-%{binsuffix} >> tools.files
221echo %{_bindir}/pydoc%{binsuffix} >> tools.files
222##echo %{_bindir}/smtpd.py%{binsuffix} >> tools.files
223echo %{_bindir}/idle%{binsuffix} >> tools.files
224
225# docs
226mkdir -p "$RPM_BUILD_ROOT"%{config_htmldir}
227(
228   cd "$RPM_BUILD_ROOT"%{config_htmldir}
229   bunzip2 < %{SOURCE1} | tar x
230)
231
232#  fix the #! line in installed files
233find "$RPM_BUILD_ROOT" -type f -print0 |
234      xargs -0 grep -l /usr/local/bin/python | while read file
235do
236   FIXFILE="$file"
237   sed 's|^#!.*python|#!%{_bindir}/env python'"%{binsuffix}"'|' \
238         "$FIXFILE" >/tmp/fix-python-path.$$
239   cat /tmp/fix-python-path.$$ > "$FIXFILE"
240   rm -f /tmp/fix-python-path.$$
241done
242
243#  check to see if there are any straggling #! lines
244find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \
245      | grep ':1:#!' >/tmp/python-rpm-files.$$ || true
246if [ -s /tmp/python-rpm-files.$$ ]
247then
248   echo '*****************************************************'
249   cat /tmp/python-rpm-files.$$
250   cat <<@EOF
251   *****************************************************
252     There are still files referencing /usr/local/bin/python in the
253     install directory.  They are listed above.  Please fix the .spec
254     file and try again.  If you are an end-user, you probably want
255     to report this to jafo-rpms@tummy.com as well.
256   *****************************************************
257@EOF
258   rm -f /tmp/python-rpm-files.$$
259   exit 1
260fi
261rm -f /tmp/python-rpm-files.$$
262
263
264%post -p /sbin/ldconfig
265%postun -p /sbin/ldconfig
266%clean
267rm -fr $RPM_BUILD_ROOT
268
269%files -f mainpkg.files
270%defattr(-, root, root)
271%license LICENSE
272%doc Misc/ACKS Misc/HISTORY Misc/NEWS Misc/Porting Misc/README
273%attr(755,root,root) %dir %{python_lib}/
274%{_libdir}/libpython*
275%{_mandir}/man1/python%{libvers}.1*
276%{_mandir}/man1/%{name}.1*
277
278%files devel
279%defattr(-,root,root)
280%dir %{_includedir}/python%{libvers}m
281%{_includedir}/python%{libvers}m/*.h
282%{_includedir}/python%{libvers}
283%{_libdir}/pkgconfig/*.pc
284
285%files -f tools.files tools
286%defattr(-,root,root)
287
288%files tkinter
289%defattr(-,root,root)
290%{python_lib}/tkinter
291%{python_lib}/lib-dynload/_tkinter.*.so*
292
293%files docs
294%defattr(-,root,root)
295%{config_htmldir}/*
296
297
298%changelog
299* Wed Apr 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.9-1
300- new upstream release.
301
302* Sat Oct 26 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.7-5
303- fixed %%files.
304
305* Tue Oct 15 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.7-4
306- rebuilt with tix-8.4.3-5.
307
308* Fri Oct 04 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.7-3
309- rebuilt with tcl/tk-8.6.9.
310
311* Sat Aug 31 2019 Toshiaki Ara <ara_t@384.jp> 3.5.7-2
312- rebuild with readline-8.0 and ncurses-6.1
313
314* Sun May 12 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.7-1
315- new upstream release.
316- rebuilt with gdbm-1.18.1.
317- added R:libtirpc-devel to python3-devel.
318
319* Thu Feb 14 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.6-3
320- added BR:libxcrypt-devel.
321- added BR:libtirpc-devel.
322- added BR:libnsl2-devel.
323
324* Sat Jan 26 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.6-2
325- rebuilt with new toolchain.
326
327* Mon Nov 19 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.6-1
328- new upstream release.
329- really rebuilt with openssl-1.1.1.
330
331* Fri Nov 02 2018 Toshiaki Ara <ara_t@384.jp> 3.5.2-2
332- rebuild with openssl-1.1.1
333
334* Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.2-1
335- new upstream release
336- update Patch1 (python-3.5.2-lib64.patch)
337
338* Sun Mar 27 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-2
339- rebuild with openssl-1.0.2g
340
341* Sat Feb 13 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-1
342- new upstream release
343- add Patch2 (python3-3.4.4-revert-makefile.patch)
344
345* Sun Apr 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.3-1
346- new upstream release
347
348* Sun Mar 22 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.4.2-2
349- rebuilt with readline 6.3
350- changed BuildRequires: tcl-devel, tk-devel instead of tcl, tk respectively
351- changed BuildRequires: libdb-devel instead of db4-devel
352
353* Sun Jan 11 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-1
354- new upstream release
355- update Patch1 (python-3.4.2-lib64.patch)
356
357* Sun Sep 07 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-3
358- remove configure option "--enable-profiling"
359
360* Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-2
361- rebuild with libffi-3.0.13
362
363* Sun Nov 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-1
364- new upstream release
365
366* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.2-1
367- updated python to 3.3.2
368
369* Sun Jan  6 2013 IWAI, Masaharu <iwai@alib.jp> 3.3.0-2
370- build with Tcl/Tk 8.5.7-1
371
372* Wed Oct 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.0-1
373- updated python to 3.3.0
374- update Patch1 (python-3.3.0-lib64.patch)
375- add BuildRequires: valgrind-devel
376
377* Sat Apr 16 2011 Shu KONNO <owa@bg.wakwak.com> 3.2-1
378- updated python to 3.2
379- updated python-*-docs-html to 3.2
380- dropt all patchs
381- added python-3.2b2-lib64.patch
382- referred to the review Python-3.2/Misc/RPM/python-3.2.spec
383
384* Fri Jan 14 2011 Shu KONNO <owa@bg.wakwak.com> 3.1.3-2
385- rebuilt with openssl-1.0.0c
386
387* Mon Nov 29 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.3-1
388- updated python to 3.1.3
389- added python-3.1.3-locale.patch
390- dropt python-3.1.2-lib64.patch
391- added python-3.1.3-lib64-*.patchs
392  python-3.1.3-lib64-Makefile.patch
393  python-3.1.3-lib64-setup.patch
394  python-3.1.3-lib64-site.patch
395  python-3.1.3-lib64-install.patch
396  python-3.1.3-lib64-sysconfig.patch
397  python-3.1.3-lib64-getpath.patch
398  python-3.1.3-lib64-test_install.patch
399- added run_test macro to run unit test
400- added BR: libffi
401
402* Sun Sep 26 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-4
403- rebuilt with rpm-4.8.1 for pkg-config
404
405* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-3
406- spec in utf-8
407
408* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-2
409- added missings in BuildRequires, Requires
410
411* Fri Jun 18 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-1
412- initial build for VineSeed
413
Note: See TracBrowser for help on using the repository browser.