]> git.pld-linux.org Git - packages/python3.git/blobdiff - python3.spec
- shell aliases commented-out by default
[packages/python3.git] / python3.spec
index bd10c09611ec2f4d6c13f4c788bc26de6512239c..7681a485678246638aa4c565d0ead23d6f42fbac 100644 (file)
@@ -1,3 +1,4 @@
+# NOTE: tests require processes limit >128 (256 is sufficient)
 #
 # Conditional build:
 %bcond_with    info                    # info pages (requires emacs)
@@ -5,7 +6,7 @@
 %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
@@ -18,8 +19,9 @@
 #   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_ssl %{?broken_tests_x32}
+%define                broken_tests    test_nntplib test_gdb test_site test_distutils test_bdist_rpm test_ssl %{?broken_tests_x32}
 
 %define py_ver         3.7
 %define py_abi         %{py_ver}m
@@ -40,7 +42,7 @@ 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:       0.1
+Release:       4
 Epoch:         1
 License:       PSF
 Group:         Development/Languages/Python
@@ -58,8 +60,11 @@ Patch8:              %{name}-install_prefix.patch
 Patch9:                %{name}-tests_with_pythonpath.patch
 Patch10:       %{name}-bdist_rpm.patch
 Patch11:       %{name}-installcompile.patch
-Patch12:                https://bugs.python.org/file21896/nonexistent_user.patch
-# Patch12-md5: db706fbe6de467c6e4c97c675eddf29a
+# https://bugs.python.org/file21896/nonexistent_user.patch
+Patch12:        nonexistent_user.patch
+Patch13:       %{name}-no-randomize-tests.patch
+# https://github.com/python/cpython/commit/c919252a28f4e9dd326dc2c703b4eee6e247be83.patch
+Patch14:       %{name}-redundant_declaration.patch
 URL:           https://www.python.org/
 BuildRequires: autoconf >= 2.65
 BuildRequires: automake
@@ -70,6 +75,9 @@ BuildRequires:        db-devel >= 4
 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
@@ -97,7 +105,7 @@ BuildRoot:   %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %if %{with verbose_tests}
 %define test_flags -v -x
 %else
-%define test_flags -w -x
+%define test_flags -wW -x
 %endif
 
 %ifarch alpha ia64 ppc64 sparc64 ppc64 %{x8664}
@@ -487,6 +495,8 @@ Moduły testowe dla Pythona.
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
+%patch13 -p1
+%patch14 -p1
 
 %{__rm} -r Modules/expat
 
@@ -546,14 +556,11 @@ BEGIN { fail = 0; logmsg = ""; }
 }
 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 \
-       TESTOPTS="%{test_flags} %{test_list}" \
-       TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:`pwd`/$binlibdir ./python -tt"
+WITHIN_PYTHON_RPM_BUILD=1 %{__make} -j1 test \
+       TESTOPTS="%{test_flags} %{test_list}"
 %endif
 
 %install
@@ -585,10 +592,10 @@ ln -s libpython%{py_abi}.so $RPM_BUILD_ROOT%{_libdir}/libpython3.so
 
 # 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/=/ /' \
@@ -597,7 +604,7 @@ 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/=/ /' \
This page took 0.031301 seconds and 4 git commands to generate.