Bug 829892 - Review Request: python27 - Parallel-installable Python 2.7 for EL6
Summary: Review Request: python27 - Parallel-installable Python 2.7 for EL6
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: Package Review
Version: el6
Hardware: All
OS: All
Target Milestone: ---
Assignee: Björn 'besser82' Esser
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 1043889 1043890
TreeView+ depends on / blocked
Reported: 2012-06-07 18:44 UTC by Mark McKinstry
Modified: 2018-04-11 08:52 UTC (History)
23 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-03-15 14:37:29 UTC
Type: ---
besser82: fedora-review?

Attachments (Terms of Use)
build.log -- FTBFS on el6 (192.93 KB, application/x-xz)
2013-10-26 09:46 UTC, Björn 'besser82' Esser
no flags Details
Patch file (1.39 KB, patch)
2014-01-13 21:26 UTC, Steve Simpson
no flags Details | Diff
Python SRPM for 2.7.6 (10.04 MB, application/x-rpm)
2014-01-14 15:43 UTC, Steve Simpson
no flags Details

Description Mark McKinstry 2012-06-07 18:44:33 UTC
Spec: http://mmckinst.fedorapeople.org/packages/python27/python27.spec
SRPM: http://mmckinst.fedorapeople.org/packages/python27/python27-2.7.3-1.el6.src.rpm
Scratch for EPEL 5: http://koji.fedoraproject.org/koji/taskinfo?taskID=4137230
Scratch for EPEL 6: http://koji.fedoraproject.org/koji/taskinfo?taskID=4137269
Fedora Account System Username: mmckinst

This is for EPEL only, it is not for Fedora. 

This version of python is installed parallel to the system python on RHEL and
CentOS systems, it does not conflict with the system provided one, they will
happily coexist.

Python 2.7 will be the last of the line for the 2.x series, there will be no
python 2.8 (http://www.python.org/dev/peps/pep-0404/).

Similar to dmalcolm's python26 RPMs, I modified Fedora 17's python 2.7 spec to
create a parallel installable version. A lot of the work was already done for
python2 vs python3 stuff, but there were still numerous things that had to be
modified to make it work on el5 and el6. The changes I did are listed in the

Comment 1 Aurelien Bompard 2013-02-20 16:16:49 UTC
I'm also interested in this package. Here's a patch to rebase it to the latest python specfile : http://abompard.fedorapeople.org/misc/python27.patch

I've rebuilt it with those changes here :

I can confirm that it works fine on EPEL6. I'll try rebuilding it for EPEL5 soon, but I have no EPEL5 box to try it on so it may take longer.

Comment 2 Aurelien Bompard 2013-02-21 10:31:32 UTC
Oops, apparently I made a mistake which prevented the build on EPEL5.
Here's a new version of my patch:
The specfile and the SRPMs are here:

EL5: http://koji.fedoraproject.org/koji/taskinfo?taskID=5039214
EL6: http://koji.fedoraproject.org/koji/taskinfo?taskID=5039258

Comment 3 Mark McKinstry 2013-05-27 17:30:06 UTC

Thanks for the patch. I've integrated your changes and upgraded to python 
2.7.5 using the latest SRPM from Fedroa 19 too.

spec: http://mmckinst.fedorapeople.org/packages/python27/python27.spec
src.rpm: http://mmckinst.fedorapeople.org/packages/python27/python27-2.7.5-1.el6.src.rpm
scratch el5: http://koji.fedoraproject.org/koji/taskinfo?taskID=5430422
scratch el6: http://koji.fedoraproject.org/koji/taskinfo?taskID=5430406

Comment 4 Björn 'besser82' Esser 2013-10-19 09:42:55 UTC
taken  ;)

Comment 5 Björn 'besser82' Esser 2013-10-19 10:13:16 UTC
FTBFS on el5, because SRPM hasn't been created with `rpmbuild-md5 -bs`.  Please provide a suitable build SRPM.

Comment 6 Björn 'besser82' Esser 2013-10-26 07:38:36 UTC
When manually reviewing the sources, I stumbled upon this somewhat wrong looking macro-definition inside macros.python27:

  # This definition is identical to that one, except that in this one
  # brp-python-bytecompile is invoked with python2.6 rather than with no
  # arguments (which leads to it incorrectly using /usr/bin/python)
  %__python27_os_install_post    \
      /usr/lib/rpm/redhat/brp-compress \
      %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \
      /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
      /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
      /usr/lib/rpm/brp-python-bytecompile /usr/bin/python2.6 \
      /usr/lib/rpm/redhat/brp-java-repack-jars \

Why this uses /usr/bin/python2.6 instead of %{__python27}?  Is this simply a non-found left-over from an older version of this file?  To me it should use %{__python27} for byte-compiling, since this is the only sensefull conclusion when using python27-devel for building.

Comment 7 Björn 'besser82' Esser 2013-10-26 09:46:43 UTC
Created attachment 816364 [details]
build.log -- FTBFS on el6

This even FTBFS on el6.  See attached build.log.

Comment 8 Matt Molyneaux 2013-12-17 18:35:14 UTC
I tried building this package with Copr, but only the EL5 build failed. The package built fine for EL6.

Build logs and packages can be found here:

Comment 9 Björn 'besser82' Esser 2013-12-17 18:39:20 UTC

Comment 10 Dustin C. Hatch 2013-12-20 19:50:36 UTC
I tried building this in CentOS 6, but it failed to create an RPM with this error:

Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/dustin/rpmbuild/BUILDROOT/python27-2.7.5-1.el6.x86_64
error: Installed (but unpackaged) file(s) found:

I tried using the SRPM from mmckinst.fedorapeople as well as the one posted by Matt on Copr, and they both had the same issue.

Comment 11 Mark McKinstry 2013-12-20 20:21:21 UTC
Bjorn and Dustin,

Sorry for the delay in responding. I'm still here. I'm going to update the RPM later tonight and will post it here.

Comment 12 Björn 'besser82' Esser 2013-12-20 20:25:41 UTC
That would be a dream!  ;)  I need this Py27 so badly.

Comment 13 Mark McKinstry 2013-12-23 03:17:54 UTC

I'm still working on this. It built fine in mock but is failing in koji for some reason. The weird part is the RPM that built before isn't building now and is failing in the test_gdb tests, complaining about "/var/lib/rpm/Name: unexpected file type or format".

Comment 14 Steve Simpson 2014-01-13 21:26:55 UTC
Created attachment 849630 [details]
Patch file

This file addresses issues if you are building without debug.

Comment 15 Steve Simpson 2014-01-13 21:32:10 UTC
I had the same errors that Dustin did. These seem to come from the fact that I'm not building debug packages. 

I have the following set in my rpmmacros:
$ cat ~/.rpmmacros | grep debug
%debug_packages	%{nil}
%debug_package %{nil}

With the patch on the spec file, http://mmckinst.fedorapeople.org/packages/python27/python27.spec, I was able to build on RHEL 6.5 with no errors.

Comment 16 Steve Simpson 2014-01-14 15:43:46 UTC
Created attachment 850013 [details]
Python SRPM for 2.7.6

I updated the spec and patches for Python 2.7.6. Seems to be building cleanly on my internal build server.

Comment 17 Matěj Cepl 2014-10-09 08:45:04 UTC
This seems like a very bad idea ... one should use Software Collections for this. For example https://www.softwarecollections.org/en/scls/rhscl/python27/ (or supported ones for RHEL).

I would suggest CLOSED/WONTFIX.

Comment 18 Honza Horak 2014-10-09 14:34:45 UTC
(In reply to Matěj Cepl from comment #17)
> I would suggest CLOSED/WONTFIX.

I agree, EPEL guys are already looking into SCL inclusion, or solve it differently using more repos:

I'd rather suggest to talk to EPEL guys directly.

Comment 19 Eric Smith 2014-10-13 04:51:21 UTC
I disagree with using Software Collections for this, because as far as I can tell, it's not then possible to have other EPEL packages that depend on a Python 2.7 from Software Collections.

Comment 20 Mark McKinstry 2014-12-01 03:09:19 UTC
I'll bring up the issues on the mailing list and post a link.

In the mean time, I've updated the src.rpm to 2.7.8 and have it building on el5 and el6.

srpm: https://mmckinst.fedorapeople.org/packages/python27/python27-2.7.8-1.el6.src.rpm
spec: https://mmckinst.fedorapeople.org/packages/python27/python27.spec

scratch el5: http://koji.fedoraproject.org/koji/taskinfo?taskID=8267070
scratch el6: http://koji.fedoraproject.org/koji/taskinfo?taskID=8267042

Comment 21 Mark McKinstry 2015-03-15 14:37:29 UTC
With the creation SCL for el6 this package is mostly not needed. 

For the people that prefer a parallel installed version like this RPM has, the IUS project (https://iuscommunity.org/pages/About.html) offers a parallel installable version of python27 for el5 and el6.

Note You need to log in before you can comment on or make changes to this bug.