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

Revision 12505, 16.4 KB checked in by tomop, 3 years ago (diff)

updated 6 packages

alsa-lib-1.2.3.2-1

alsa-oss-1.1.8-1

alsa-plugins-1.2.2-1

libproxy-0.4.15-4

python3-3.8.6-1

samba-4.13.0-2

Line 
1%bcond_with run_test
2
3%define libvers 3.8
4%define binsuffix 3.8
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.8.6
11Release: 1%{?_dist_release}
12Group: programming
13Vendor: Project Vine
14Distribution: Vine Linux
15
16License: Python
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
20# (Patches taken from github.com/fedora-python/cpython)
21
22# 00001 # d06a8853cf4bae9e115f45e1d531d2dc152c5cc8
23# Fixup distutils/unixccompiler.py to remove standard library path from rpath
24# Was Patch0 in ivazquez' python3000 specfile
25Patch1: 00001-rpath.patch
26
27# 00102 # ec4353c0f646eb567cc0d63e1e41eb5e29cc3e81
28# Change the various install paths to use /usr/lib64/ instead or /usr/lib/
29#
30# Only used when "%%{_lib}" == "lib64".
31Patch102: 00102-lib64.patch
32
33# 00111 # 03918d404a40a50c9f5f93dc748b52e613d70d31
34# Don't try to build a libpythonMAJOR.MINOR.a
35#
36# Downstream only: not appropriate for upstream.
37#
38# See https://bugzilla.redhat.com/show_bug.cgi?id=556092
39Patch111: 00111-no-static-lib.patch
40
41# 00189 # adf51ed04ac74fd6fc39c642af35b87680c71dab
42# Instead of bundled wheels, use our RPM packaged wheels
43#
44# We keep them in /usr/share/python-wheels
45#
46# Downstream only: upstream bundles
47# We might eventually pursuit upstream support, but it's low prio
48Patch189: 00189-use-rpm-wheels.patch
49# The following versions of setuptools/pip are bundled when this patch is not applied.
50# The versions are written in Lib/ensurepip/__init__.py, this patch removes them.
51# When the bundled setuptools/pip wheel is updated, the patch no longer applies cleanly.
52# In such cases, the patch needs to be amended and the versions updated here:
53%global pip_version 20.1.1
54%global setuptools_version 47.1.0
55
56# 00251 # 2eabd04356402d488060bc8fe316ad13fc8a3356
57# Change user install location
58#
59# Set values of prefix and exec_prefix in distutils install command
60# to /usr/local if executable is /usr/bin/python* and RPM build
61# is not detected to make pip and distutils install into separate location.
62#
63# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
64# Downstream only: Awaiting resources to work on upstream PEP
65Patch251: 00251-change-user-install-location.patch
66
67# 00274 # 1e9258f6e8f70e86d5130113d3eed22993cf3da9
68# Upstream uses Debian-style architecture naming, change to match Fedora
69Patch274: 00274-fix-arch-names.patch
70
71# 00328 # 367fdcb5a075f083aea83ac174999272a8faf75c
72# Restore pyc to TIMESTAMP invalidation mode as default in rpmbuild
73#
74# Since Fedora 31, the $SOURCE_DATE_EPOCH is set in rpmbuild to the latest
75# %%changelog date. This makes Python default to the CHECKED_HASH pyc
76# invalidation mode, bringing more reproducible builds traded for an import
77# performance decrease. To avoid that, we don't default to CHECKED_HASH
78# when $RPM_BUILD_ROOT is set (i.e. when we are building RPM packages).
79#
80# See https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/57#comment-27426
81# Downstream only: only used when building RPM packages
82# Ideally, we should talk to upstream and explain why we don't want this
83Patch328: 00328-pyc-timestamp-invalidation-mode.patch
84
85BuildRoot: %{_tmppath}/%{name}-%{version}-root
86BuildRequires: autoconf
87BuildRequires: bzip2-devel
88BuildRequires: expat-devel
89BuildRequires: findutils
90BuildRequires: gcc-c++
91BuildRequires: gdbm-devel
92BuildRequires: glibc-devel
93BuildRequires: libdb-devel
94BuildRequires: libffi-devel
95BuildRequires: libnsl2-devel
96BuildRequires: libtirpc-devel
97BuildRequires: libxcrypt-devel
98BuildRequires: ncurses-devel
99BuildRequires: openssl-devel
100BuildRequires: pkgconfig
101BuildRequires: readline-devel
102BuildRequires: sqlite3-devel
103BuildRequires: tar
104BuildRequires: valgrind-devel
105BuildRequires: xz-devel
106BuildRequires: zlib-devel
107
108%description
109Python is an interpreted, interactive, object-oriented programming
110language.  It incorporates modules, exceptions, dynamic typing, very high
111level dynamic data types, and classes. Python combines remarkable power
112with very clear syntax. It has interfaces to many system calls and
113libraries, as well as to various window systems, and is extensible in C or
114C++. It is also usable as an extension language for applications that need
115a programmable interface.  Finally, Python is portable: it runs on many
116brands of UNIX, on PCs under Windows, MS-DOS, and OS/2, and on the
117Mac.
118
119
120%package devel
121Summary: The libraries and header files needed for Python development.
122Group: programming
123Requires: %{name} = %{version}-%{release}
124Requires: libtirpc-devel
125
126%description devel
127The Python programming language's interpreter can be extended with
128dynamically loaded extensions and can be embedded in other programs.
129This package contains the header files and libraries needed to do
130these types of tasks.
131
132Install python-devel if you want to develop Python extensions.  The
133python package will also need to be installed.  You'll probably also
134want to install the python-docs package, which contains Python
135documentation.
136
137%package tkinter
138Summary: A graphical user interface for the Python scripting language.
139Group: programming
140Requires: %{name} = %{version}-%{release}
141Requires: tcl, tk, tix
142Requires: libX11, libxcb, libXau, libXdmcp
143BuildRequires: tcl-devel, tk-devel, tix
144BuildRequires: libX11-devel, libxcb-devel, libXau-devel, libXdmcp-devel
145
146%description tkinter
147The Tkinter (Tk interface) program is an graphical user interface for
148the Python scripting language.
149
150You should install the tkinter package if you'd like to use a graphical
151user interface for Python programming.
152
153
154%package tools
155Summary: A collection of development tools included with Python.
156Group: programming
157Requires: %{name} = %{version}-%{release}
158Requires: %{name}-tkinter = %{version}
159
160%description tools
161The Python package includes several development tools that are used
162to build python programs.
163
164
165%package docs
166Summary: Documentation for the Python programming language.
167Summary(ja): Python プログラミング言語のドキュメント
168Group: documentation
169
170%description docs
171The python-docs package contains documentation on the Python
172programming language and interpreter.  The documentation is provided
173in ASCII text files and in LaTeX source files.
174
175Install the python-docs package if you'd like to use the documentation
176for the Python language.
177
178
179%debug_package
180
181
182%prep
183%setup -q -n Python-%{version}
184# Remove all exe files to ensure we are not shipping prebuilt binaries
185# note that those are only used to create Microsoft Windows installers
186# and that functionality is broken on Linux anyway
187find -name '*.exe' -print -delete
188
189# Remove bundled libraries to ensure that we're using the system copy.
190rm -r Modules/expat
191
192#
193# Apply patches:
194#
195%patch1 -p1
196
197%if "%{_lib}" == "lib64"
198%patch102 -p1
199%endif
200%patch111 -p1
201
202%if %{with rpmwheels}
203%patch189 -p1
204rm Lib/ensurepip/_bundled/*.whl
205%endif
206
207%patch251 -p1
208%patch274 -p1
209%patch328 -p1
210
211# Remove files that should be generated by the build
212# (This is after patching, so that we can use patches directly from upstream)
213rm configure pyconfig.h.in
214
215# Regenerate the configure script and pyconfig.h.in
216autoconf
217autoheader
218
219
220%build
221export CFLAGS="%{?extension_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
222export CFLAGS_NODIST="%{?build_cflags} -D_GNU_SOURCE -fPIC -fwrapv%{?with_no_semantic_interposition: -fno-semantic-interposition}"
223export CXXFLAGS="%{?extension_cxxflags} -D_GNU_SOURCE -fPIC -fwrapv"
224export CPPFLAGS="$(pkg-config --cflags-only-I libffi)"
225export OPT="%{?extension_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
226export LINKCC="gcc"
227export CFLAGS="$CFLAGS $(pkg-config --cflags openssl)"
228export LDFLAGS="%{?extension_ldflags} -g $(pkg-config --libs-only-L openssl)"
229export LDFLAGS_NODIST="%{?build_ldflags}%{?with_no_semantic_interposition: -fno-semantic-interposition} -g $(pkg-config --libs-only-L openssl)"
230
231./configure \
232        --prefix=%{_prefix} \
233        --libdir=%{_libdir} \
234        --enable-ipv6 \
235        --enable-shared \
236        --with-computed-gotos=yes \
237        --with-dbmliborder=gdbm:ndbm:bdb \
238        --with-system-expat \
239        --with-system-ffi \
240        --enable-loadable-sqlite-extensions \
241        --with-lto \
242        --with-ssl-default-suites=openssl \
243        --with-valgrind \
244        --without-ensurepip \
245        --enable-optimizations \
246        %{nil}
247
248make %{?_smp_mflags} CFLAGS_NODIST="$CFLAGS_NODIST" \
249        regen-all PYTHON_FOR_REGEN="python%{binsuffix}"
250
251make %{?_smp_mflags} CFLAGS_NODIST="$CFLAGS_NODIST"
252
253
254%install
255[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
256make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
257
258# replace path in pydoc
259if [ ! -z "%{binsuffix}" ]
260then
261   (
262      cd $RPM_BUILD_ROOT%{_bindir}
263      mv pydoc%{libvers} pydoc.old
264      sed 's|#!.*|#!%{_bindir}/env python'%{libvers}'|' \
265            pydoc.old > pydoc%{libvers}
266      chmod 755 pydoc%{libvers}
267      rm -f pydoc.old
268   )
269fi
270
271#  Tools
272echo '#!%{_bindir}/env python%{binsuffix}' > ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
273echo 'import os, sys' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
274echo 'os.execvp("%{_bindir}/python%{binsuffix}", ["%{_bindir}/python%{binsuffix}", "%{python_lib}/idlelib/idle.py"] + sys.argv[1:])' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
275echo 'print "Failed to exec Idle"' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
276echo 'sys.exit(1)' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
277chmod 755 $RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix}
278cp -a Tools $RPM_BUILD_ROOT%{python_lib}
279
280# make file lists
281rm -f mainpkg.files
282find "$RPM_BUILD_ROOT"%{python_lib} -type f |
283        sed "s|^${RPM_BUILD_ROOT}|/|" |
284        grep -v \
285                -e '/python%{libvers}/config$' \
286                -e '_tkinter.so$' \
287                -e '_tkinter.cpython-' \
288                >> mainpkg.files
289
290rm -f $RPM_BUILD_ROOT%{_prefix}/bin/2to3
291find "$RPM_BUILD_ROOT""%{_prefix}"/bin -type f -o -type l |
292        sed "s|^${RPM_BUILD_ROOT}|/|" |
293        grep -v -e '/bin/2to3%{binsuffix}$' |
294        grep -v -e '/bin/pydoc%{binsuffix}$' |
295        grep -v -e '/bin/smtpd.py%{binsuffix}$' |
296        grep -v -e '/bin/idle%{binsuffix}$' >> mainpkg.files
297
298
299rm -f tools.files
300find "$RPM_BUILD_ROOT"%{python_lib}/idlelib \
301      "$RPM_BUILD_ROOT"%{python_lib}/Tools -type f |
302      sed "s|^${RPM_BUILD_ROOT}|/|" > tools.files
303echo %{_bindir}/2to3-%{binsuffix} >> tools.files
304echo %{_bindir}/pydoc%{binsuffix} >> tools.files
305##echo %{_bindir}/smtpd.py%{binsuffix} >> tools.files
306echo %{_bindir}/idle%{binsuffix} >> tools.files
307
308# docs
309mkdir -p "$RPM_BUILD_ROOT"%{config_htmldir}
310(
311   cd "$RPM_BUILD_ROOT"%{config_htmldir}
312   bunzip2 < %{SOURCE1} | tar x
313)
314
315#  fix the #! line in installed files
316find "$RPM_BUILD_ROOT" -type f -print0 |
317      xargs -0 grep -l /usr/local/bin/python | while read file
318do
319   FIXFILE="$file"
320   sed 's|^#!.*python|#!%{_bindir}/env python'"%{binsuffix}"'|' \
321         "$FIXFILE" >/tmp/fix-python-path.$$
322   cat /tmp/fix-python-path.$$ > "$FIXFILE"
323   rm -f /tmp/fix-python-path.$$
324done
325
326#  check to see if there are any straggling #! lines
327find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \
328      | grep ':1:#!' >/tmp/python-rpm-files.$$ || true
329if [ -s /tmp/python-rpm-files.$$ ]
330then
331   echo '*****************************************************'
332   cat /tmp/python-rpm-files.$$
333   cat <<@EOF
334   *****************************************************
335     There are still files referencing /usr/local/bin/python in the
336     install directory.  They are listed above.  Please fix the .spec
337     file and try again.  If you are an end-user, you probably want
338     to report this to jafo-rpms@tummy.com as well.
339   *****************************************************
340@EOF
341   rm -f /tmp/python-rpm-files.$$
342   exit 1
343fi
344rm -f /tmp/python-rpm-files.$$
345
346
347%if %{with run_test}
348%check
349make test
350%endif
351
352
353%clean
354rm -fr $RPM_BUILD_ROOT
355
356
357%post -p /sbin/ldconfig
358%postun -p /sbin/ldconfig
359
360
361%files -f mainpkg.files
362%defattr(-, root, root)
363%license LICENSE
364%doc Misc/ACKS Misc/HISTORY Misc/NEWS Misc/Porting Misc/README
365%attr(755,root,root) %dir %{python_lib}/
366%{_libdir}/libpython*
367%{_mandir}/man1/python%{libvers}.1*
368%{_mandir}/man1/%{name}.1*
369
370%files devel
371%defattr(-,root,root)
372%dir %{_includedir}/python%{libvers}
373%dir %{_includedir}/python%{libvers}/cpython
374%dir %{_includedir}/python%{libvers}/internal
375%{_includedir}/python%{libvers}/*.h
376%{_includedir}/python%{libvers}/cpython/*.h
377%{_includedir}/python%{libvers}/internal/*.h
378%{_libdir}/pkgconfig/*.pc
379
380%files -f tools.files tools
381%defattr(-,root,root)
382
383%files tkinter
384%defattr(-,root,root)
385%{python_lib}/tkinter
386%{python_lib}/lib-dynload/_tkinter.*.so*
387
388%files docs
389%defattr(-,root,root)
390%{config_htmldir}/*
391
392
393%changelog
394* Fri Oct 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.8.6-1
395- new upstream release.
396
397* Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.8.5-1
398- new upstream release.
399
400* Wed Apr 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.9-1
401- new upstream release.
402
403* Sat Oct 26 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.7-5
404- fixed %%files.
405
406* Tue Oct 15 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.7-4
407- rebuilt with tix-8.4.3-5.
408
409* Fri Oct 04 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.7-3
410- rebuilt with tcl/tk-8.6.9.
411
412* Sat Aug 31 2019 Toshiaki Ara <ara_t@384.jp> 3.5.7-2
413- rebuild with readline-8.0 and ncurses-6.1
414
415* Sun May 12 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.7-1
416- new upstream release.
417- rebuilt with gdbm-1.18.1.
418- added R:libtirpc-devel to python3-devel.
419
420* Thu Feb 14 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.6-3
421- added BR:libxcrypt-devel.
422- added BR:libtirpc-devel.
423- added BR:libnsl2-devel.
424
425* Sat Jan 26 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.6-2
426- rebuilt with new toolchain.
427
428* Mon Nov 19 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.6-1
429- new upstream release.
430- really rebuilt with openssl-1.1.1.
431
432* Fri Nov 02 2018 Toshiaki Ara <ara_t@384.jp> 3.5.2-2
433- rebuild with openssl-1.1.1
434
435* Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.2-1
436- new upstream release
437- update Patch1 (python-3.5.2-lib64.patch)
438
439* Sun Mar 27 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-2
440- rebuild with openssl-1.0.2g
441
442* Sat Feb 13 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-1
443- new upstream release
444- add Patch2 (python3-3.4.4-revert-makefile.patch)
445
446* Sun Apr 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.3-1
447- new upstream release
448
449* Sun Mar 22 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.4.2-2
450- rebuilt with readline 6.3
451- changed BuildRequires: tcl-devel, tk-devel instead of tcl, tk respectively
452- changed BuildRequires: libdb-devel instead of db4-devel
453
454* Sun Jan 11 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-1
455- new upstream release
456- update Patch1 (python-3.4.2-lib64.patch)
457
458* Sun Sep 07 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-3
459- remove configure option "--enable-profiling"
460
461* Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-2
462- rebuild with libffi-3.0.13
463
464* Sun Nov 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-1
465- new upstream release
466
467* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.2-1
468- updated python to 3.3.2
469
470* Sun Jan  6 2013 IWAI, Masaharu <iwai@alib.jp> 3.3.0-2
471- build with Tcl/Tk 8.5.7-1
472
473* Wed Oct 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.0-1
474- updated python to 3.3.0
475- update Patch1 (python-3.3.0-lib64.patch)
476- add BuildRequires: valgrind-devel
477
478* Sat Apr 16 2011 Shu KONNO <owa@bg.wakwak.com> 3.2-1
479- updated python to 3.2
480- updated python-*-docs-html to 3.2
481- dropt all patchs
482- added python-3.2b2-lib64.patch
483- referred to the review Python-3.2/Misc/RPM/python-3.2.spec
484
485* Fri Jan 14 2011 Shu KONNO <owa@bg.wakwak.com> 3.1.3-2
486- rebuilt with openssl-1.0.0c
487
488* Mon Nov 29 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.3-1
489- updated python to 3.1.3
490- added python-3.1.3-locale.patch
491- dropt python-3.1.2-lib64.patch
492- added python-3.1.3-lib64-*.patchs
493  python-3.1.3-lib64-Makefile.patch
494  python-3.1.3-lib64-setup.patch
495  python-3.1.3-lib64-site.patch
496  python-3.1.3-lib64-install.patch
497  python-3.1.3-lib64-sysconfig.patch
498  python-3.1.3-lib64-getpath.patch
499  python-3.1.3-lib64-test_install.patch
500- added run_test macro to run unit test
501- added BR: libffi
502
503* Sun Sep 26 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-4
504- rebuilt with rpm-4.8.1 for pkg-config
505
506* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-3
507- spec in utf-8
508
509* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-2
510- added missings in BuildRequires, Requires
511
512* Fri Jun 18 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-1
513- initial build for VineSeed
514
Note: See TracBrowser for help on using the repository browser.