39 |
# 33. file |
# 33. file |
40 |
# 34. rpmlint |
# 34. rpmlint |
41 |
# 35. rpm-mageia-setup %%bcond_with bootstrap |
# 35. rpm-mageia-setup %%bcond_with bootstrap |
42 |
|
|
43 |
# Then the most important packages have to be built, starting from their |
# Then the most important packages have to be built, starting from their |
44 |
# various leaf dependencies recursively. After these have been built, a |
# various leaf dependencies recursively. After these have been built, a |
45 |
# targeted rebuild should be requested for the rest. |
# targeted rebuild should be requested for the rest. |
48 |
# rebuild after a python abi change: |
# rebuild after a python abi change: |
49 |
# python-sphinx, python-pytest, python-requests |
# python-sphinx, python-pytest, python-requests |
50 |
|
|
51 |
%global docver 3.7.4 |
%global pybasever 3.8 |
|
|
|
|
%global pybasever 3.7 |
|
52 |
%global familyver 3 |
%global familyver 3 |
53 |
|
|
54 |
#pybasever without the dot: |
# pybasever without the dot: |
55 |
%global pyshortver 37 |
%global pyshortver 38 |
56 |
|
|
57 |
|
# version |
58 |
|
%global version 3.8.0 |
59 |
|
|
60 |
|
# comment out if not prerel |
61 |
|
%global prerel b4 |
62 |
|
|
63 |
|
# rel for bumping |
64 |
|
%global rel 1 |
65 |
|
|
66 |
|
%bcond_without bootstrap |
67 |
|
|
68 |
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package |
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package |
69 |
# Uses upstream bundled prebuilt wheels otherwise |
# Uses upstream bundled prebuilt wheels otherwise |
70 |
%bcond_without rpmwheels |
%bcond_without rpmwheels |
71 |
|
|
72 |
|
# Expensive optimizations (mainly, profile-guided optimizations) |
73 |
|
%bcond_without optimizations |
74 |
|
|
75 |
# Run the test suite in %%check |
# Run the test suite in %%check |
76 |
%bcond_without tests |
%bcond_without tests |
77 |
|
|
81 |
# The dbm.gnu module (key-value database) |
# The dbm.gnu module (key-value database) |
82 |
%bcond_without gdbm |
%bcond_without gdbm |
83 |
|
|
84 |
|
# Main interpreter loop optimization |
85 |
|
%bcond_without computed_gotos |
86 |
|
|
87 |
# Support for the Valgrind debugger/profiler |
# Support for the Valgrind debugger/profiler |
88 |
%ifarch %{valgrind_arches} |
%ifarch %{valgrind_arches} |
89 |
%bcond_without valgrind |
%bcond_without valgrind |
91 |
%bcond_with valgrind |
%bcond_with valgrind |
92 |
%endif |
%endif |
93 |
|
|
94 |
# Some defines to ease files list |
|
95 |
|
# ===================== |
96 |
|
# General global macros |
97 |
|
# ===================== |
98 |
|
|
99 |
%global pylibdir %{_libdir}/python%{pybasever} |
%global pylibdir %{_libdir}/python%{pybasever} |
100 |
%global dynload_dir %{pylibdir}/lib-dynload |
%global dynload_dir %{pylibdir}/lib-dynload |
101 |
%global site_packages %{pylibdir}/site-packages |
%global site_packages %{pylibdir}/site-packages |
102 |
|
|
103 |
# ABIFLAGS, LDVERSION and SOABI are in the upstream configure.ac |
# ABIFLAGS, LDVERSION and SOABI are in the upstream configure.ac |
104 |
# See PEP 3149 for some background: http://www.python.org/dev/peps/pep-3149/ |
# See PEP 3149 for some background: http://www.python.org/dev/peps/pep-3149/ |
105 |
%global ABIFLAGS_optimized m |
%global ABIFLAGS_optimized %{nil} |
106 |
|
|
107 |
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized} |
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized} |
108 |
|
|
117 |
# foo/__pycache__/bar.cpython-%%{pyshortver}.pyc |
# foo/__pycache__/bar.cpython-%%{pyshortver}.pyc |
118 |
# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-1.pyc |
# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-1.pyc |
119 |
# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-2.pyc |
# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-2.pyc |
120 |
%global bytecode_suffixes .cpython-%{pyshortver}*.py? |
%global bytecode_suffixes .cpython-%{pyshortver}*.pyc |
121 |
|
|
122 |
# Disable automatic bytecompilation. The python3 binary is not yet be |
# Disable automatic bytecompilation. The python3 binary is not yet be |
123 |
# available in /usr/bin when Python is built. Also, the bytecompilation fails |
# available in /usr/bin when Python is built. Also, the bytecompilation fails |
131 |
|
|
132 |
Summary: An interpreted, interactive object-oriented programming language |
Summary: An interpreted, interactive object-oriented programming language |
133 |
Name: python3 |
Name: python3 |
134 |
Version: 3.7.4 |
Version: 3.8.0 |
135 |
Release: %mkrel 3 |
Release: %mkrel %{?prerel:0.%prerel.}%{rel} |
136 |
License: Modified CNRI Open Source License |
License: Modified CNRI Open Source License |
137 |
Group: Development/Python |
Group: Development/Python |
138 |
|
|
168 |
BuildRequires: python-pip-wheel |
BuildRequires: python-pip-wheel |
169 |
%endif |
%endif |
170 |
|
|
171 |
Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz |
%if %{without bootstrap} |
172 |
Source1: https://docs.python.org/%{pybasever}/archives/python-%{docver}-docs-html.tar.bz2 |
# for make regen-all and distutils.tests.test_bdist_rpm |
173 |
|
BuildRequires: python3 |
174 |
|
%endif |
175 |
|
|
176 |
|
Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}%{?prerel}.tar.xz |
177 |
|
Source1: https://docs.python.org/%{pybasever}/archives/python-%{version}%{?prerel}-docs-html.tar.bz2 |
178 |
|
|
179 |
# A simple script to check timestamps of bytecode files |
# A simple script to check timestamps of bytecode files |
180 |
# Run in check section with Python that is currently being built |
# Run in check section with Python that is currently being built |
207 |
# Downstream only: not appropriate for upstream |
# Downstream only: not appropriate for upstream |
208 |
Patch111: 00111-no-static-lib.patch |
Patch111: 00111-no-static-lib.patch |
209 |
|
|
|
# 00132 # |
|
|
# Add non-standard hooks to unittest for use in the "check" phase below, when |
|
|
# running selftests within the build: |
|
|
# @unittest._skipInRpmBuild(reason) |
|
|
# for tests that hang or fail intermittently within the build environment, and: |
|
|
# @unittest._expectedFailureInRpmBuild |
|
|
# for tests that always fail within the build environment |
|
|
# |
|
|
# The hooks only take effect if WITHIN_PYTHON_RPM_BUILD is set in the |
|
|
# environment, which we set manually in the appropriate portion of the "check" |
|
|
# phase below (and which potentially other python-* rpms could set, to reuse |
|
|
# these unittest hooks in their own "check" phases) |
|
|
Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch |
|
|
|
|
|
# 00155 # |
|
|
# Avoid allocating thunks in ctypes unless absolutely necessary, to avoid |
|
|
# generating SELinux denials on "import ctypes" and "import uuid" when |
|
|
# embedding Python within httpd |
|
|
# See https://bugzilla.redhat.com/show_bug.cgi?id=814391 |
|
|
Patch155: 00155-avoid-ctypes-thunks.patch |
|
|
|
|
|
# 00160 # |
|
|
# Python 3.3 added os.SEEK_DATA and os.SEEK_HOLE, which may be present in the |
|
|
# header files in the build chroot, but may not be supported in the running |
|
|
# kernel, hence we disable this test in an rpm build. |
|
|
# Adding these was upstream issue http://bugs.python.org/issue10142 |
|
|
# Not yet sent upstream |
|
|
Patch160: 00160-disable-test_fs_holes-in-rpm-build.patch |
|
|
|
|
|
# 00163 # |
|
|
# Some tests within test_socket fail intermittently when run inside Koji; |
|
|
# disable them using unittest._skipInRpmBuild |
|
|
# Not yet sent upstream |
|
|
Patch163: 00163-disable-parts-of-test_socket-in-rpm-build.patch |
|
|
|
|
|
# 00170 # |
|
|
# In debug builds, try to print repr() when a C-level assert fails in the |
|
|
# garbage collector (typically indicating a reference-counting error |
|
|
# somewhere else e.g in an extension module) |
|
|
# The new macros/functions within gcmodule.c are hidden to avoid exposing |
|
|
# them within the extension API. |
|
|
# Sent upstream: http://bugs.python.org/issue9263 |
|
|
# See https://bugzilla.redhat.com/show_bug.cgi?id=614680 |
|
|
Patch170: 00170-gc-assertions.patch |
|
|
|
|
|
# 00178 # |
|
|
# Don't duplicate various FLAGS in sysconfig values |
|
|
# http://bugs.python.org/issue17679 |
|
|
# Does not affect python2 AFAICS (different sysconfig values initialization) |
|
|
Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch |
|
|
|
|
210 |
# 00189 # |
# 00189 # |
211 |
# Instead of bundled wheels, use our RPM packaged wheels from |
# Instead of bundled wheels, use our RPM packaged wheels from |
212 |
# /usr/share/python-wheels |
# /usr/share/python-wheels |
213 |
Patch189: 00189-use-rpm-wheels.patch |
Patch189: 00189-use-rpm-wheels.patch |
214 |
|
|
|
# 00205 # |
|
|
# LIBPL variable in makefile takes LIBPL from configure.ac |
|
|
# but the LIBPL variable defined there doesn't respect libdir macro |
|
|
Patch205: 00205-make-libpl-respect-lib64.patch |
|
|
|
|
215 |
# 00251 |
# 00251 |
216 |
# Set values of prefix and exec_prefix in distutils install command |
# Set values of prefix and exec_prefix in distutils install command |
217 |
# to /usr/local if executable is /usr/bin/python* and RPM build |
# to /usr/local if executable is /usr/bin/python* and RPM build |
219 |
# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe |
# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe |
220 |
Patch251: 00251-change-user-install-location.patch |
Patch251: 00251-change-user-install-location.patch |
221 |
|
|
222 |
# 00316 # |
# 00274 # |
223 |
# We remove the exe files from distutil's bdist_wininst |
# Upstream uses Debian-style architecture naming. Change to match Fedora. |
224 |
# So we mark the command as unsupported - and the tests are skipped |
Patch274: 00274-fix-arch-names.patch |
225 |
Patch316: 00316-mark-bdist_wininst-unsupported.patch |
|
226 |
|
# 00328 # |
227 |
|
# Restore pyc to TIMESTAMP invalidation mode as default in rpmbubild |
228 |
|
# See https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/57#comment-27426 |
229 |
|
Patch328: 00328-pyc-timestamp-invalidation-mode.patch |
230 |
|
|
231 |
|
# 00331 # |
232 |
|
# Fix StructUnionType_paramfunc() |
233 |
|
# Fix a ctypes regression of Python 3.8 |
234 |
|
# Merged upstream https://bugs.python.org/issue37140 |
235 |
|
# Fixes clang FTBFS https://bugzilla.redhat.com/show_bug.cgi?id=1715016 |
236 |
|
Patch331: 00331-fix-structuniontype_paramfunc.patch |
237 |
|
|
238 |
|
# (New patches go here ^^^) |
239 |
# |
# |
240 |
# Mageia patches |
# Mageia patches |
241 |
# |
# |
243 |
Patch501: python3-3.5.2-skip-distutils-tests-that-fail-in-rpmbuild.patch |
Patch501: python3-3.5.2-skip-distutils-tests-that-fail-in-rpmbuild.patch |
244 |
Patch502: python3-3.7.1-uid-gid-overflows.patch |
Patch502: python3-3.7.1-uid-gid-overflows.patch |
245 |
Patch503: python3-3.5.2-dont-raise-from-py_compile.patch |
Patch503: python3-3.5.2-dont-raise-from-py_compile.patch |
|
Patch504: python3-3.5.2-remove-hf-from-arm-triplet.patch |
|
246 |
Patch506: python3-3.6.2-python3-config-LIBPLUSED-cmp0004-error.patch |
Patch506: python3-3.6.2-python3-config-LIBPLUSED-cmp0004-error.patch |
247 |
|
|
|
|
|
248 |
Provides: python(abi) = %{pybasever} |
Provides: python(abi) = %{pybasever} |
249 |
Provides: /usr/bin/python%{LDVERSION_optimized} |
Provides: /usr/bin/python%{LDVERSION_optimized} |
250 |
Provides: /usr/bin/python%{pybasever} |
Provides: /usr/bin/python%{pybasever} |
251 |
Requires: python-rpm-macros |
Requires: python-rpm-macros |
252 |
Requires: python3-rpm-macros |
Requires: python3-rpm-macros |
253 |
|
|
|
Conflicts: tkinter3 < %{version} |
|
254 |
Conflicts: python < 2.7.16-3 |
Conflicts: python < 2.7.16-3 |
255 |
Requires: %{lib_name} = %{version}-%{release} |
Requires: %{lib_name} = %{version}-%{release} |
256 |
|
|
288 |
Requires: python-setuptools-wheel |
Requires: python-setuptools-wheel |
289 |
Requires: python-pip-wheel |
Requires: python-pip-wheel |
290 |
%else |
%else |
291 |
Provides: bundled(python3-pip) = 19.0.3 |
Provides: bundled(python3-pip) = 19.2.3 |
292 |
Provides: bundled(python3-setuptools) = 40.8.0 |
Provides: bundled(python3-setuptools) = 41.2.0 |
293 |
%endif |
%endif |
294 |
|
|
295 |
%description -n %{lib_name}-stdlib |
%description -n %{lib_name}-stdlib |
311 |
%package -n %{develname} |
%package -n %{develname} |
312 |
Summary: The libraries and header files needed for Python development |
Summary: The libraries and header files needed for Python development |
313 |
Group: Development/Python |
Group: Development/Python |
314 |
Requires: %{name} = %version |
Requires: %{name} = %{version}-%{release} |
315 |
Requires: %{lib_name} = %{version}-%{release} |
Requires: %{lib_name} = %{version}-%{release} |
316 |
Provides: %{name}-devel = %{version}-%{release} |
Provides: %{name}-devel = %{version}-%{release} |
317 |
Provides: %{lib_name_orig}-devel = %{version}-%{release} |
Provides: %{lib_name_orig}-devel = %{version}-%{release} |
368 |
Various applications written using tkinter |
Various applications written using tkinter |
369 |
|
|
370 |
%prep |
%prep |
371 |
%setup -qn Python-%{version} |
%setup -qn Python-%{version}%{?prerel} |
372 |
# Remove all exe files to ensure we are not shipping prebuilt binaries |
# Remove all exe files to ensure we are not shipping prebuilt binaries |
373 |
# note that those are only used to create Microsoft Windows installers |
# note that those are only used to create Microsoft Windows installers |
374 |
# and that functionality is broken on Linux anyway |
# and that functionality is broken on Linux anyway |
384 |
%patch102 -p1 |
%patch102 -p1 |
385 |
%endif |
%endif |
386 |
%patch111 -p1 |
%patch111 -p1 |
|
%patch132 -p1 |
|
|
%patch155 -p1 |
|
|
%patch160 -p1 |
|
|
%patch163 -p1 |
|
|
%patch170 -p1 |
|
|
%patch178 -p1 |
|
387 |
|
|
388 |
%if %{with rpmwheels} |
%if %{with rpmwheels} |
389 |
%patch189 -p1 |
%patch189 -p1 |
390 |
rm Lib/ensurepip/_bundled/*.whl |
rm Lib/ensurepip/_bundled/*.whl |
391 |
%endif |
%endif |
392 |
|
|
|
%patch205 -p1 |
|
393 |
%patch251 -p1 |
%patch251 -p1 |
394 |
%patch316 -p1 |
%patch274 -p1 |
395 |
|
%patch328 -p1 |
396 |
|
%patch331 -p1 |
397 |
|
|
398 |
# Mageia patches |
# Mageia patches |
399 |
%patch500 -p1 |
#patch500 -p1 |
400 |
%patch501 -p1 |
%patch501 -p1 |
401 |
%patch502 -p1 |
%patch502 -p1 |
402 |
%patch503 -p1 |
%patch503 -p1 |
|
%patch504 -p1 |
|
403 |
%patch506 -p1 |
%patch506 -p1 |
404 |
|
|
405 |
# Remove files that should be generated by the build |
# Remove files that should be generated by the build |
418 |
%build |
%build |
419 |
autoreconf -vfi |
autoreconf -vfi |
420 |
|
|
|
# We need -fwrapv |
|
|
# https://bugs.python.org/issue34096 |
|
|
export OPT="%{optflags} -D_GNU_SOURCE -fPIC -fwrapv" |
|
|
export CFLAGS="%{optflags} -D_GNU_SOURCE -fPIC -fwrapv" |
|
|
export CXXFLAGS="%{optflags} -D_GNU_SOURCE -fPIC -fwrapv" |
|
|
|
|
|
# to fix curses module build |
|
|
# https://bugs.mageia.org/show_bug.cgi?id=6702 |
|
|
export CPPFLAGS="-I/usr/include/ncursesw" |
|
|
|
|
421 |
# Remove -Wl,--no-undefined in accordance with MGA #9395 : |
# Remove -Wl,--no-undefined in accordance with MGA #9395 : |
422 |
# https://bugs.mageia.org/show_bug.cgi?id=9395 |
# https://bugs.mageia.org/show_bug.cgi?id=9395 |
423 |
%define _disable_ld_no_undefined 1 |
%define _disable_ld_no_undefined 1 |
424 |
|
|
425 |
|
# Get proper option names from bconds |
426 |
|
%if %{with computed_gotos} |
427 |
|
%global computed_gotos_flag yes |
428 |
|
%else |
429 |
|
%global computed_gotos_flag no |
430 |
|
%endif |
431 |
|
|
432 |
|
%if %{with optimizations} |
433 |
|
%global optimizations_flag "--enable-optimizations" |
434 |
|
%else |
435 |
|
%global optimizations_flag "--disable-optimizations" |
436 |
|
%endif |
437 |
|
|
438 |
|
export CFLAGS="%{optflags} -D_GNU_SOURCE -fPIC -fwrapv" |
439 |
|
export CFLAGS_NODIST="%{optflags} -D_GNU_SOURCE -fPIC -fwrapv" |
440 |
|
export CXXFLAGS="%{optflags} -D_GNU_SOURCE -fPIC -fwrapv" |
441 |
|
export CPPFLAGS="$(pkg-config --cflags-only-I libffi)" |
442 |
|
export OPT="%{optflags} -D_GNU_SOURCE -fPIC -fwrapv" |
443 |
|
export LINKCC="gcc" |
444 |
|
export CFLAGS="$CFLAGS $(pkg-config --cflags openssl)" |
445 |
|
export LDFLAGS="%{ldflags} $(pkg-config --libs-only-L openssl)" |
446 |
|
export LDFLAGS_NODIST="%{ldflags} $(pkg-config --libs-only-L openssl)" |
447 |
|
|
448 |
%configure2_5x \ |
%configure2_5x \ |
449 |
--enable-ipv6 \ |
--enable-ipv6 \ |
450 |
--enable-shared \ |
--enable-shared \ |
451 |
--with-dbmliborder=gdbm \ |
--with-computed-gotos=%{computed_gotos_flag} \ |
452 |
|
--with-dbmliborder=gdbm:ndbm:bdb \ |
453 |
--with-system-expat \ |
--with-system-expat \ |
454 |
--with-system-ffi \ |
--with-system-ffi \ |
455 |
--enable-loadable-sqlite-extensions \ |
--enable-loadable-sqlite-extensions \ |
460 |
--with-valgrind \ |
--with-valgrind \ |
461 |
%endif |
%endif |
462 |
--with-threads \ |
--with-threads \ |
463 |
--without-ensurepip |
--without-ensurepip \ |
464 |
|
%{optimizations_flag} |
465 |
|
|
466 |
# (misc) if the home is nfs mounted, rmdir fails due to delay |
# (misc) if the home is nfs mounted, rmdir fails due to delay |
467 |
export TMP="/tmp" TMPDIR="/tmp" |
export TMP="/tmp" TMPDIR="/tmp" |
468 |
|
|
469 |
make EXTRA_CFLAGS="$CFLAGS" LN="ln -sf" |
%if %{without bootstrap} |
470 |
|
# Regenerate generated files (needs python3) |
471 |
|
%make_build regen-all PYTHON_FOR_REGEN="python%{pybasever}" |
472 |
|
%endif |
473 |
|
|
474 |
|
%make_build EXTRA_CFLAGS="$CFLAGS" LN="ln -sf" |
475 |
|
|
476 |
%install |
%install |
477 |
|
|
508 |
|
|
509 |
# overwrite the copied binary with a link |
# overwrite the copied binary with a link |
510 |
pushd %{buildroot}%{_bindir} |
pushd %{buildroot}%{_bindir} |
511 |
ln -sf python%{LDVERSION_optimized} python%{pybasever} |
#ln -sf python%{LDVERSION_optimized} python%{pybasever} |
512 |
ln -sf python%{pybasever} python%{familyver} |
ln -sf python%{pybasever} python%{familyver} |
513 |
popd |
popd |
514 |
|
|
519 |
# make python3 as default one |
# make python3 as default one |
520 |
ln -s ./python3 %{buildroot}%{_bindir}/python |
ln -s ./python3 %{buildroot}%{_bindir}/python |
521 |
ln -s ./pydoc3 %{buildroot}%{_bindir}/pydoc |
ln -s ./pydoc3 %{buildroot}%{_bindir}/pydoc |
522 |
|
ln -s ./pygettext3.py %{buildroot}%{_bindir}/pygettext.py |
523 |
|
ln -s ./msgfmt3.py %{buildroot}%{_bindir}/msgfmt.py |
524 |
ln -s ./python3-config %{buildroot}%{_bindir}/python-config |
ln -s ./python3-config %{buildroot}%{_bindir}/python-config |
525 |
ln -s ./python3.1 %{buildroot}%{_mandir}/man1/python.1 |
ln -s ./python3.1 %{buildroot}%{_mandir}/man1/python.1 |
526 |
ln -s ./python3.pc %{buildroot}%{_libdir}/pkgconfig/python.pc |
ln -s ./python3.pc %{buildroot}%{_libdir}/pkgconfig/python.pc |
602 |
# See https://github.com/fedora-python/python-rpm-porting/issues/24 |
# See https://github.com/fedora-python/python-rpm-porting/issues/24 |
603 |
cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/ |
cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/ |
604 |
|
|
605 |
|
# Install i18n tools to bindir |
606 |
|
# They are also in python2, so we version them |
607 |
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1571474 |
608 |
|
for tool in pygettext msgfmt; do |
609 |
|
cp -p Tools/i18n/${tool}.py %{buildroot}%{_bindir}/${tool}%{pybasever}.py |
610 |
|
ln -s ${tool}%{pybasever}.py %{buildroot}%{_bindir}/${tool}3.py |
611 |
|
done |
612 |
|
|
613 |
# Switch all shebangs to refer to the specific Python version. |
# Switch all shebangs to refer to the specific Python version. |
614 |
# This currently only covers files matching ^[a-zA-Z0-9_]+\.py$, |
# This currently only covers files matching ^[a-zA-Z0-9_]+\.py$, |
615 |
# so handle files named using other naming scheme separately. |
# so handle files named using other naming scheme separately. |
617 |
Tools/scripts/pathfix.py \ |
Tools/scripts/pathfix.py \ |
618 |
-i "%{_bindir}/python%{pybasever}" -pn \ |
-i "%{_bindir}/python%{pybasever}" -pn \ |
619 |
%{buildroot} \ |
%{buildroot} \ |
620 |
|
%{buildroot}%{_bindir}/*%{pybasever}.py \ |
621 |
%{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py} |
%{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py} |
622 |
|
|
623 |
# Remove shebang lines from .py files that aren't executable, and |
# Remove shebang lines from .py files that aren't executable, and |
681 |
EXCLUDE="$EXCLUDE test_json" |
EXCLUDE="$EXCLUDE test_json" |
682 |
# to investigate why it fails on local build |
# to investigate why it fails on local build |
683 |
EXCLUDE="$EXCLUDE test_site" |
EXCLUDE="$EXCLUDE test_site" |
684 |
|
%if %{with bootstrap} |
685 |
|
EXCLUDE="$EXCLUDE test_distutils" |
686 |
|
%endif |
687 |
# all tests must pass |
# all tests must pass |
688 |
# but we disable network on BS |
# but we disable network on BS |
689 |
WITHIN_PYTHON_RPM_BUILD= \ |
WITHIN_PYTHON_RPM_BUILD= \ |
701 |
%{_bindir}/python%{familyver} |
%{_bindir}/python%{familyver} |
702 |
%{_bindir}/python%{pybasever} |
%{_bindir}/python%{pybasever} |
703 |
%{_bindir}/python%{LDVERSION_optimized} |
%{_bindir}/python%{LDVERSION_optimized} |
|
%{_bindir}/pyvenv |
|
|
%{_bindir}/pyvenv-%{pybasever} |
|
704 |
%{_bindir}/2to3 |
%{_bindir}/2to3 |
705 |
%{_bindir}/2to3-%{pybasever} |
%{_bindir}/2to3-%{pybasever} |
706 |
%{_mandir}/man*/* |
%{_mandir}/man*/* |
858 |
%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so |
%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so |
859 |
%{dynload_dir}/_opcode.%{SOABI_optimized}.so |
%{dynload_dir}/_opcode.%{SOABI_optimized}.so |
860 |
%{dynload_dir}/_pickle.%{SOABI_optimized}.so |
%{dynload_dir}/_pickle.%{SOABI_optimized}.so |
861 |
|
%{dynload_dir}/_posixshmem.%{SOABI_optimized}.so |
862 |
%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so |
%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so |
863 |
%{dynload_dir}/_queue.%{SOABI_optimized}.so |
%{dynload_dir}/_queue.%{SOABI_optimized}.so |
864 |
%{dynload_dir}/_random.%{SOABI_optimized}.so |
%{dynload_dir}/_random.%{SOABI_optimized}.so |
865 |
%{dynload_dir}/_socket.%{SOABI_optimized}.so |
%{dynload_dir}/_socket.%{SOABI_optimized}.so |
866 |
%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so |
%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so |
867 |
|
%{dynload_dir}/_statistics.%{SOABI_optimized}.so |
868 |
%{dynload_dir}/_ssl.%{SOABI_optimized}.so |
%{dynload_dir}/_ssl.%{SOABI_optimized}.so |
869 |
%{dynload_dir}/_struct.%{SOABI_optimized}.so |
%{dynload_dir}/_struct.%{SOABI_optimized}.so |
870 |
%{dynload_dir}/_md5.%{SOABI_optimized}.so |
%{dynload_dir}/_md5.%{SOABI_optimized}.so |
871 |
%{dynload_dir}/_sha1.%{SOABI_optimized}.so |
%{dynload_dir}/_sha1.%{SOABI_optimized}.so |
872 |
%{dynload_dir}/_sha256.%{SOABI_optimized}.so |
%{dynload_dir}/_sha256.%{SOABI_optimized}.so |
873 |
%{dynload_dir}/_sha512.%{SOABI_optimized}.so |
%{dynload_dir}/_sha512.%{SOABI_optimized}.so |
874 |
|
%{dynload_dir}/_xxsubinterpreters.%{SOABI_optimized}.so |
875 |
%{dynload_dir}/array.%{SOABI_optimized}.so |
%{dynload_dir}/array.%{SOABI_optimized}.so |
876 |
%{dynload_dir}/audioop.%{SOABI_optimized}.so |
%{dynload_dir}/audioop.%{SOABI_optimized}.so |
877 |
%{dynload_dir}/binascii.%{SOABI_optimized}.so |
%{dynload_dir}/binascii.%{SOABI_optimized}.so |
891 |
%{dynload_dir}/spwd.%{SOABI_optimized}.so |
%{dynload_dir}/spwd.%{SOABI_optimized}.so |
892 |
%{dynload_dir}/syslog.%{SOABI_optimized}.so |
%{dynload_dir}/syslog.%{SOABI_optimized}.so |
893 |
%{dynload_dir}/termios.%{SOABI_optimized}.so |
%{dynload_dir}/termios.%{SOABI_optimized}.so |
|
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so |
|
894 |
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so |
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so |
895 |
%{dynload_dir}/_uuid.%{SOABI_optimized}.so |
%{dynload_dir}/_uuid.%{SOABI_optimized}.so |
896 |
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so |
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so |
904 |
%{pylibdir}/distutils/tests |
%{pylibdir}/distutils/tests |
905 |
%{pylibdir}/lib2to3/tests |
%{pylibdir}/lib2to3/tests |
906 |
%{pylibdir}/sqlite3/test |
%{pylibdir}/sqlite3/test |
907 |
%{pylibdir}/test/* |
%{pylibdir}/test/ |
908 |
%{pylibdir}/unittest/test |
%{pylibdir}/unittest/test |
909 |
# These two are shipped in the main subpackage: |
# These two are shipped in the main subpackage: |
910 |
%exclude %{pylibdir}/test/test_support.py* |
%exclude %{pylibdir}/test/test_support.py* |
913 |
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so |
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so |
914 |
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so |
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so |
915 |
%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so |
%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so |
916 |
|
%{dynload_dir}/_testinternalcapi.%{SOABI_optimized}.so |
917 |
|
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so |
918 |
%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so |
%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so |
919 |
|
|
920 |
%files -n %{lib_name} |
%files -n %{lib_name} |
922 |
|
|
923 |
%files -n %{develname} |
%files -n %{develname} |
924 |
%{_bindir}/pathfix.py |
%{_bindir}/pathfix.py |
925 |
|
|
926 |
|
%{_bindir}/pygettext.py |
927 |
|
%{_bindir}/pygettext%{familyver}*.py |
928 |
|
|
929 |
|
%{_bindir}/msgfmt.py |
930 |
|
%{_bindir}/msgfmt%{familyver}*.py |
931 |
|
|
932 |
|
%{_bindir}/python-config |
933 |
|
%{_bindir}/python%{pybasever}-config |
934 |
|
%{_bindir}/python%{LDVERSION_optimized}-config |
935 |
|
%{_bindir}/python%{familyver}-config |
936 |
|
|
937 |
%{_libdir}/libpython%{LDVERSION_optimized}.so |
%{_libdir}/libpython%{LDVERSION_optimized}.so |
938 |
%{_libdir}/libpython%{pybasever}.so |
%{_libdir}/libpython%{pybasever}.so |
939 |
%{_libdir}/libpython%{familyver}.so |
%{_libdir}/libpython%{familyver}.so |
940 |
%{_includedir}/python%{LDVERSION_optimized} |
%{_includedir}/python%{LDVERSION_optimized} |
941 |
%exclude %{_includedir}/python%{LDVERSION_optimized}/pyconfig-%{__isa_bits}.h |
%exclude %{_includedir}/python%{LDVERSION_optimized}/pyconfig-%{__isa_bits}.h |
942 |
%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu} |
%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu} |
|
%{_bindir}/python-config |
|
|
%{_bindir}/python%{pybasever}-config |
|
|
%{_bindir}/python%{LDVERSION_optimized}-config |
|
|
%{_bindir}/python%{familyver}-config |
|
943 |
%{_libdir}/pkgconfig/python.pc |
%{_libdir}/pkgconfig/python.pc |
944 |
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc |
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc |
945 |
%{_libdir}/pkgconfig/python-%{pybasever}.pc |
%{_libdir}/pkgconfig/python-%{pybasever}{,-embed}.pc |
946 |
%{_libdir}/pkgconfig/python%{familyver}.pc |
%{_libdir}/pkgconfig/python%{familyver}{,-embed}.pc |
947 |
|
|
948 |
%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile |
%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile |
949 |
%if %{with valgrind} |
%if %{with valgrind} |