+# NOTE: tests require processes limit >128 (256 is sufficient)
#
# Conditional build:
%bcond_with info # info pages (requires emacs)
%bcond_without tkinter # disables tkinter module building
%bcond_without tests # disables Python testing
%bcond_with verbose_tests # runs tests in verbose mode
-%bcond_without optimizations # optimitations
+%bcond_without optimizations # expensive, stable optimizations (PGO etc.) + LTO
#
# tests which will not work on 64-bit platforms
%define no64bit_tests test_audioop test_rgbimg test_imageop
# test_time: test_AsTimeval (test.test_time.TestCPyTime), rounding error
%ifarch x32
%define broken_tests_x32 test_time
+%undefine with_optimizations
%endif
%define broken_tests test_nntplib test_gdb test_site test_distutils test_bdist_rpm test_ssl %{?broken_tests_x32}
Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili
Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом
Name: python3
-Version: %{py_ver}.0
-Release: 1
+Version: %{py_ver}.1
+Release: 2
Epoch: 1
License: PSF
Group: Development/Languages/Python
Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
-# Source0-md5: eb8c2a6b1447d50813c02714af4681f3
+# Source0-md5: 0a57e9022c07fad3dadb2eef58568edb
Source1: pyconfig.h.in
Patch0: %{name}-pythonpath.patch
Patch1: %{name}-ac_fixes.patch
Patch11: %{name}-installcompile.patch
# https://bugs.python.org/file21896/nonexistent_user.patch
Patch12: nonexistent_user.patch
-Patch13: python3-no-randomize-tests.patch
+Patch13: %{name}-no-randomize-tests.patch
URL: https://www.python.org/
BuildRequires: autoconf >= 2.65
BuildRequires: automake
BuildRequires: expat-devel >= 1:1.95.7
BuildRequires: file
BuildRequires: gdbm-devel >= 1.8.3
+%if %(locale -a | grep -q '^C\.utf8$'; echo $?)
+BuildRequires: glibc-localedb-all
+%endif
BuildRequires: gmp-devel >= 4.0
BuildRequires: libffi-devel
BuildRequires: libstdc++-devel
}
END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }'
-LC_ALL=C
+LC_ALL=C.UTF-8
export LC_ALL
%if %{with tests}
-binlibdir=`echo build/lib.*`
-# -l and -j don't go together! and -j is brought up by Tools/scripts/run_tests.py
-WITHIN_PYTHON_RPM_BUILD=1 %{__make} test \
+WITHIN_PYTHON_RPM_BUILD=1 %{__make} -j1 test \
TESTOPTS="%{test_flags} %{test_list}"
%endif
$RPM_BUILD_ROOT{%{py_sitedir},%{py_sitescriptdir}}/__pycache__ \
$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
$RPM_BUILD_ROOT{%{_infodir},%{_mandir}/man1} \
- $RPM_BUILD_ROOT/etc/shrc.d
+ $RPM_BUILD_ROOT/etc/shrc.d \
+ $RPM_BUILD_ROOT%{_prefix}/lib/debug/%{_libdir}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libpython3.so
ln -s libpython%{py_abi}.so $RPM_BUILD_ROOT%{_libdir}/libpython3.so
+# gdb helper that will end up in -debuginfo package
+soname=$(ls -1d $RPM_BUILD_ROOT%{_libdir}/libpython%{py_abi}.so.*.* | sed -e "s#^$RPM_BUILD_ROOT##g")
+cp -a Tools/gdb/libpython.py "$RPM_BUILD_ROOT%{_prefix}/lib/debug/$soname-gdb.py"
+
#
# create several useful aliases, such as timeit.py, profile.py, pdb.py, smtpd.py
#
# for python devel tools
for script in timeit profile pdb pstats; do
- echo "alias ${script}%{py_ver}.py='python%{py_ver} -m ${script}'"
+ echo "#alias ${script}%{py_ver}.py='python%{py_ver} -m ${script}'"
done > $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-devel.sh
-echo "alias pygettext%{py_ver}.py='pygettext%{py_ver}'" \
+echo "#alias pygettext%{py_ver}.py='pygettext%{py_ver}'" \
>> $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-devel.sh
sed 's/=/ /' \
# for python modules
for script in smtpd webbrowser; do
- echo "alias ${script}%{py_ver}.py='python%{py_ver} -m ${script}'"
+ echo "#alias ${script}%{py_ver}.py='python%{py_ver} -m ${script}'"
done > $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-modules.sh
sed 's/=/ /' \