diff --git a/python3-ac_fixes.patch b/python3-ac_fixes.patch index b005cdd..3568002 100644 --- a/python3-ac_fixes.patch +++ b/python3-ac_fixes.patch @@ -1,6 +1,6 @@ --- Python-3.6.2/configure.ac~ 2017-07-08 05:33:27.000000000 +0200 +++ Python-3.6.2/configure.ac 2017-08-07 10:28:44.498951134 +0200 -@@ -1494,26 +1494,7 @@ then +@@ -1491,24 +1491,7 @@ then CFLAGS_ALIASING="-fno-strict-aliasing" fi @@ -22,9 +22,8 @@ - OPT="-O3 -Wall" - ;; - esac -- -- OPT="$OPT $STRICT_PROTO" -+ OPT="$OPT $CPPFLAGS $CFLAGS $STRICT_PROTO" ++ OPT="$OPT $CPPFLAGS $CFLAGS" case $ac_sys_system in SCO_SV*) OPT="$OPT -m486 -DSCO5" + diff --git a/python3.spec b/python3.spec index 3da5ed6..b0d1557 100644 --- a/python3.spec +++ b/python3.spec @@ -5,6 +5,7 @@ %bcond_without tkinter # disables tkinter module building %bcond_without tests # disables Python testing %bcond_with verbose_tests # runs tests in verbose mode +%bcond_with optimizations # optimitations # # tests which will not work on 64-bit platforms %define no64bit_tests test_audioop test_rgbimg test_imageop @@ -17,6 +18,7 @@ # 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} @@ -38,13 +40,13 @@ Summary(ru.UTF-8): Язык программирования очень высо 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}.5 -Release: 3 +Version: %{py_ver}.6 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 9f49654a4d6f733ff3284ab9d227e9fd +# Source0-md5: c3f30a0aff425dda77d19e02f420d6ba Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -531,7 +533,11 @@ fi --with-system-expat \ --with-system-ffi \ %{?with_system_mpdecimal:--with-system-libmpdec} \ - --with-threads + --with-threads \ +%if %{with optimizations} + --enable-optimizations \ + --with-lto +%endif %{__make} 2>&1 | awk ' BEGIN { fail = 0; logmsg = ""; }