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

Revision 12286, 12.6 KB checked in by tomop, 5 years ago (diff)

updated 10 packages

Field3D-1.7.2-2

ImageMagick?-6.9.10.69-1

OpenColorIO-1.1.1-1

OpenEXR-2.4.0-1

OpenImageIO-2.0.11-1

babl-0.1.72-1

e2fsprogs-1.45.4-1

elfutils-0.177-1

gegl04-0.4.16-1

python3-3.5.7-5

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: 5%{?_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 \
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* Sat Oct 26 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.7-5
300- fixed %%files.
301
302* Tue Oct 15 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.7-4
303- rebuilt with tix-8.4.3-5.
304
305* Fri Oct 04 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.7-3
306- rebuilt with tcl/tk-8.6.9.
307
308* Sat Aug 31 2019 Toshiaki Ara <ara_t@384.jp> 3.5.7-2
309- rebuild with readline-8.0 and ncurses-6.1
310
311* Sun May 12 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.7-1
312- new upstream release.
313- rebuilt with gdbm-1.18.1.
314- added R:libtirpc-devel to python3-devel.
315
316* Thu Feb 14 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.6-3
317- added BR:libxcrypt-devel.
318- added BR:libtirpc-devel.
319- added BR:libnsl2-devel.
320
321* Sat Jan 26 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.6-2
322- rebuilt with new toolchain.
323
324* Mon Nov 19 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.6-1
325- new upstream release.
326- really rebuilt with openssl-1.1.1.
327
328* Fri Nov 02 2018 Toshiaki Ara <ara_t@384.jp> 3.5.2-2
329- rebuild with openssl-1.1.1
330
331* Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.2-1
332- new upstream release
333- update Patch1 (python-3.5.2-lib64.patch)
334
335* Sun Mar 27 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-2
336- rebuild with openssl-1.0.2g
337
338* Sat Feb 13 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-1
339- new upstream release
340- add Patch2 (python3-3.4.4-revert-makefile.patch)
341
342* Sun Apr 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.3-1
343- new upstream release
344
345* Sun Mar 22 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.4.2-2
346- rebuilt with readline 6.3
347- changed BuildRequires: tcl-devel, tk-devel instead of tcl, tk respectively
348- changed BuildRequires: libdb-devel instead of db4-devel
349
350* Sun Jan 11 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-1
351- new upstream release
352- update Patch1 (python-3.4.2-lib64.patch)
353
354* Sun Sep 07 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-3
355- remove configure option "--enable-profiling"
356
357* Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-2
358- rebuild with libffi-3.0.13
359
360* Sun Nov 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-1
361- new upstream release
362
363* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.2-1
364- updated python to 3.3.2
365
366* Sun Jan  6 2013 IWAI, Masaharu <iwai@alib.jp> 3.3.0-2
367- build with Tcl/Tk 8.5.7-1
368
369* Wed Oct 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.0-1
370- updated python to 3.3.0
371- update Patch1 (python-3.3.0-lib64.patch)
372- add BuildRequires: valgrind-devel
373
374* Sat Apr 16 2011 Shu KONNO <owa@bg.wakwak.com> 3.2-1
375- updated python to 3.2
376- updated python-*-docs-html to 3.2
377- dropt all patchs
378- added python-3.2b2-lib64.patch
379- referred to the review Python-3.2/Misc/RPM/python-3.2.spec
380
381* Fri Jan 14 2011 Shu KONNO <owa@bg.wakwak.com> 3.1.3-2
382- rebuilt with openssl-1.0.0c
383
384* Mon Nov 29 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.3-1
385- updated python to 3.1.3
386- added python-3.1.3-locale.patch
387- dropt python-3.1.2-lib64.patch
388- added python-3.1.3-lib64-*.patchs
389  python-3.1.3-lib64-Makefile.patch
390  python-3.1.3-lib64-setup.patch
391  python-3.1.3-lib64-site.patch
392  python-3.1.3-lib64-install.patch
393  python-3.1.3-lib64-sysconfig.patch
394  python-3.1.3-lib64-getpath.patch
395  python-3.1.3-lib64-test_install.patch
396- added run_test macro to run unit test
397- added BR: libffi
398
399* Sun Sep 26 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-4
400- rebuilt with rpm-4.8.1 for pkg-config
401
402* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-3
403- spec in utf-8
404
405* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-2
406- added missings in BuildRequires, Requires
407
408* Fri Jun 18 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-1
409- initial build for VineSeed
410
Note: See TracBrowser for help on using the repository browser.