The package rpms/python2.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/python2.git/commit/?id=1554ebbaa5....
Change:
+%ifarch %{ix86} x86_64
Thanks.
Full change:
============
commit 1554ebbaa5294f56aa0883ed2f1791f6b8fd53b6
Author: Charalampos Stratakis <cstratak(a)redhat.com>
Date: Wed May 10 16:41:09 2017 +0200
Enable profile guided optimizations for x86_64 and i686 architectures.
Added patch for fixing recompilation of Python when using common
build commands and the --enable-optimizations flag.
diff --git a/00269-fix-multiple-compilations-issue-with-pgo-builds.patch
b/00269-fix-multiple-compilations-issue-with-pgo-builds.patch
new file mode 100644
index 0000000..2e5b33d
--- /dev/null
+++ b/00269-fix-multiple-compilations-issue-with-pgo-builds.patch
@@ -0,0 +1,63 @@
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 9e4be0a..a58b59c 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -863,12 +863,12 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
+ TESTOPTS= -l $(EXTRATESTOPTS)
+ TESTPROG= $(srcdir)/Lib/test/regrtest.py
+ TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
+-test: all platform
++test: @DEF_MAKE_RULE@ platform
+ -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
+ -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
+ $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
+
+-testall: all platform
++testall: @DEF_MAKE_RULE@ platform
+ -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
+ $(TESTPYTHON) $(srcdir)/Lib/compileall.py
+ -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
+@@ -877,7 +877,7 @@ testall: all platform
+
+ # Run the unitests for both architectures in a Universal build on OSX
+ # Must be run on an Intel box.
+-testuniversal: all platform
++testuniversal: @DEF_MAKE_RULE@ platform
+ if [ `arch` != 'i386' ];then \
+ echo "This can only be used on OSX/i386" ;\
+ exit 1 ;\
+@@ -900,14 +900,14 @@ QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3
\
+ test_multibytecodec test_urllib2_localnet test_itertools \
+ test_multiprocessing test_mailbox test_socket test_poll \
+ test_select test_zipfile
+-quicktest: all platform
++quicktest: @DEF_MAKE_RULE@ platform
+ -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
+ -$(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
+ $(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
+
+ MEMTESTOPTS= $(QUICKTESTOPTS) -x test_dl test___all__ test_fork1 \
+ test_longexp
+-memtest: all platform
++memtest: @DEF_MAKE_RULE@ platform
+ -rm -f $(srcdir)/Lib/test/*.py[co]
+ -$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
+ $(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
+@@ -1198,7 +1198,7 @@ LIBPL= $(LIBP)/config$(DEBUG_SUFFIX)
+ # pkgconfig directory
+ LIBPC= $(LIBDIR)/pkgconfig
+
+-libainstall: all python$(DEBUG_SUFFIX)-config
++libainstall: @DEF_MAKE_RULE@ python$(DEBUG_SUFFIX)-config
+ @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
+ do \
+ if test ! -d $(DESTDIR)$$i; then \
+@@ -1425,7 +1425,7 @@ distclean: clobber
+ -exec rm -f {} ';'
+
+ # Check for smelly exported symbols (not starting with Py/_Py)
+-smelly: all
++smelly: @DEF_MAKE_RULE@
+ nm -p $(LIBRARY) | \
+ sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
+
diff --git a/python2.spec b/python2.spec
index 54d4c28..5f044b0 100644
--- a/python2.spec
+++ b/python2.spec
@@ -110,7 +110,7 @@ Summary: An interpreted, interactive, object-oriented programming
language
Name: %{python}
# Remember to also rebase python-docs when changing this:
Version: 2.7.13
-Release: 7%{?dist}
+Release: 8%{?dist}
License: Python
Group: Development/Languages
Requires: %{python}-libs%{?_isa} = %{version}-%{release}
@@ -762,8 +762,11 @@ Patch250: 00250-getentropy.patch
# scripts specified as an entry_points
Patch252: 00252-add-executable-option.patch
-# Disable tk for modularity builds to break up build dependencies
-Patch04000: 04000-modularity-disable-tk.patch
+# 00269 #
+# Fix python's recompilation with common build commands when using
+# profile guided optimizations.
+# Fixed upstream:
http://bugs.python.org/issue29243
+Patch269: 00269-fix-multiple-compilations-issue-with-pgo-builds.patch
# (New patches go here ^^^)
#
@@ -777,6 +780,10 @@ Patch04000: 04000-modularity-disable-tk.patch
# This is the generated patch to "configure"; see the description of
# %{regenerate_autotooling_patch}
# above:
+
+# Disable tk for modularity builds to break up build dependencies
+Patch04000: 04000-modularity-disable-tk.patch
+
Patch5000: 05000-autotool-intermediates.patch
# ======================================================
@@ -1070,6 +1077,7 @@ mv Modules/cryptmodule.c Modules/_cryptmodule.c
%patch250 -p1
%patch252 -p1
+%patch269 -p1
%if ! 0%{?_module_build}
%patch4000 -p1
@@ -1207,7 +1215,11 @@ BuildPython debug \
BuildPython optimized \
python \
python%{pybasever} \
+%ifarch %{ix86} x86_64
+ "--enable-optimizations" \
+%else
"" \
+%endif
true
@@ -1940,6 +1952,10 @@ rm -fr %{buildroot}
# ======================================================
%changelog
+* Wed May 10 2017 Charalampos Stratakis <cstratak(a)redhat.com> - 2.7.13-8
+- Enable profile guided optimizations for x86_64 and i686 architectures
+- Update description to reflect that Python 2 is not the default Python
+
* Tue Apr 25 2017 Karsten Hopp <karsten(a)redhat.com> - 2.7.13-7
- apply modularity patch only during module builds
commit 890215f62732dcf76de3ca9c7021acecc32da0d0
Author: Charalampos Stratakis <cstratak(a)redhat.com>
Date: Wed May 10 15:26:35 2017 +0200
Change description, to reflect that python2 is obsoleted by Python 3 as
the default Python interpreter.
Also reduce verbosity for the descriptions of subpackages.
Use https sources URL.
diff --git a/python2.spec b/python2.spec
index da73c16..54d4c28 100644
--- a/python2.spec
+++ b/python2.spec
@@ -189,7 +189,7 @@ Requires: python2-pip
# Source code and patches
# =======================
-Source:
http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
+Source:
https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
# Work around bug 562906 until it's fixed in rpm-build by providing a fixed
# version of pythondeps.sh:
@@ -767,7 +767,7 @@ Patch04000: 04000-modularity-disable-tk.patch
# (New patches go here ^^^)
#
-# When adding new patches to "python" and "python3" in Fedora, EL,
etc.,
+# When adding new patches to "python2" and "python3" in Fedora, EL,
etc.,
# please try to keep the patch numbers in-sync between all specfiles.
#
# More information, and a patch number catalog, is at:
@@ -796,25 +796,20 @@ BuildRoot:
%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
URL:
https://www.python.org/
%description
-Python is an interpreted, interactive, object-oriented programming
-language often compared to Tcl, Perl, Scheme or Java. Python includes
-modules, classes, exceptions, very high level dynamic data types and
-dynamic typing. Python supports interfaces to many system calls and
-libraries, as well as to various windowing systems (X11, Motif, Tk,
-Mac and MFC).
-
-Programmers can write new built-in modules for Python in C or C++.
-Python can be used as an extension language for applications that need
-a programmable interface.
-
-Note that documentation for Python is provided in the python-docs
+Python 2 is an old version of the language that is incompatible with the 3.x
+line of releases. The language is mostly the same, but many details, especially
+how built-in objects like dictionaries and strings work, have changed
+considerably, and a lot of deprecated features have finally been removed in the
+3.x line.
+
+Note that documentation for Python 2 is provided in the python2-docs
package.
-This package provides the "python" executable; most of the actual
-implementation is within the "python-libs" package.
+This package provides the "python2" executable; most of the actual
+implementation is within the "python2-libs" package.
%package libs
-Summary: Runtime libraries for Python
+Summary: Runtime libraries for Python 2
Group: Applications/System
# Needed for ctypes, to load libraries, worked around for Live CDs size
@@ -834,13 +829,10 @@ Provides: python-libs%{?_isa} = %{version}-%{release}
Obsoletes: python-libs < %{obs}
%description libs
-This package contains runtime libraries for use by Python:
-- the libpython dynamic library, for use by applications that embed Python as
-a scripting language, and by the main "python" executable
-- the Python standard library
+This package contains files used to embed Python 2 into applications.
%package devel
-Summary: The libraries and header files needed for Python development
+Summary: Libraries and header files needed for Python 2 development
Group: Development/Libraries
Requires: %{python}%{?_isa} = %{version}-%{release}
Requires: python-rpm-macros
@@ -855,18 +847,11 @@ Provides: python-devel%{?_isa} = %{version}-%{release}
Obsoletes: python-devel < %{obs}
%description devel
-The Python programming language's interpreter can be extended with
-dynamically loaded extensions and can be embedded in other programs.
-This package contains the header files and libraries needed to do
-these types of tasks.
-
-Install python-devel if you want to develop Python extensions. The
-python package will also need to be installed. You'll probably also
-want to install the python-docs package, which contains Python
-documentation.
+This package contains libraries and header files used to build applications
+with and native libraries for Python 2
%package tools
-Summary: A collection of development tools included with Python
+Summary: A collection of development tools included with Python 2
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
Requires: %{python}-tkinter = %{version}-%{release}
@@ -876,12 +861,12 @@ Provides: python-tools%{?_isa} = %{version}-%{release}
Obsoletes: python-tools < %{obs}
%description tools
-This package includes several tools to help with the development of Python
+This package includes several tools to help with the development of Python 2
programs, including IDLE (an IDE with editing and debugging facilities), a
color editor (pynche), and a python gettext program (pygettext.py).
%package tkinter
-Summary: A graphical user interface for the Python scripting language
+Summary: A graphical user interface for the Python 2 scripting language
Group: Development/Languages
Requires: %{name} = %{version}-%{release}
@@ -896,13 +881,13 @@ Obsoletes: tkinter < %{obs}
%description tkinter
The Tkinter (Tk interface) program is an graphical user interface for
-the Python scripting language.
+the Python 2 scripting language.
-You should install the tkinter package if you'd like to use a graphical
-user interface for Python programming.
+You should install the python2tkinter package if you'd like to use a graphical
+user interface for Python 2 programming.
%package test
-Summary: The test modules from the main python package
+Summary: The test modules from the main python2 package
Group: Development/Languages
Requires: %{name} = %{version}-%{release}
@@ -912,16 +897,16 @@ Obsoletes: python-test < %{obs}
%description test
-The test modules from the main python package: %{name}
+The test modules from the main python2 package: %{name}
These have been removed to save space, as they are never or almost
never used in production.
-You might want to install the python-test package if you're developing python
+You might want to install the python2-test package if you're developing python 2
code that uses more than just unittest and/or test_support.py.
%if 0%{?with_debug_build}
%package debug
-Summary: Debug version of the Python runtime
+Summary: Debug version of the Python 2 runtime
Group: Applications/System
# The debug build is an all-in-one package version of the regular build, and
@@ -939,20 +924,20 @@ Provides: python-debug%{?_isa} = %{version}-%{release}
Obsoletes: python-debug < %{obs}
%description debug
-python-debug provides a version of the Python runtime with numerous debugging
+python2-debug provides a version of the Python 2 runtime with numerous debugging
features enabled, aimed at advanced Python users, such as developers of Python
extension modules.
-This version uses more memory and will be slower than the regular Python build,
+This version uses more memory and will be slower than the regular Python 2 build,
but is useful for tracking down reference-counting issues, and other bugs.
The bytecodes are unchanged, so that .pyc files are compatible between the two
-version of Python, but the debugging features mean that C/C++ extension modules
+version of Python 2, but the debugging features mean that C/C++ extension modules
are ABI-incompatible with those built for the standard runtime.
-It shares installation directories with the standard Python runtime, so that
+It shares installation directories with the standard Python 2 runtime, so that
.py and .pyc files can be shared. All compiled extension modules gain a "_d"
-suffix ("foo_d.so" rather than "foo.so") so that each Python
implementation can
+suffix ("foo_d.so" rather than "foo.so") so that each Python 2
implementation can
load its own extensions.
%endif # with_debug_build