Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: The packaging guidelines say that manual python byte compilation is possible in EPEL. https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#_manual_byte_compilation_for_fedora_29_or_earlier_including_epel However, it doesn't work on EL6. https://src.fedoraproject.org/rpms/python-rpm-macros/blob/el6/f/macros.pybytecompile#_24 python_version=$(%1 -c "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))") \ $ python -c "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))" Traceback (most recent call last): File "<string>", line 1, in <module> AttributeError: 'tuple' object has no attribute 'major' sys.version_info.{major,minor} doesn't exist in EL6's Python. This is similar to bug 1369486. Version-Release number of selected component (if applicable): python-rpm-macros-3-14.el6.noarch How reproducible: always
This should do: '{0[0]}{0[1]}'.format(sys.version_info) However not sure if the remaining part of %py_byte_compile works with 2.6 or not. Could you test?
Please reopen if you have an answer.
Sorry I never got around to testing this. I'm clearing the needsinfo because I don't intend to come back around to this before the EL6 end of life.