Python 2.7 will reach end-of-life in January 2020, over 9 years after it was released. This falls within the Fedora 31 lifetime. Packages that depend on Python 2 are being switched to Python 3 or removed from Fedora: https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages Python 2 will be retired in Fedora 32: https://fedoraproject.org/wiki/Changes/RetirePython2 To help planning, we'd like to know the plans for cppcheck's future. Specifically: - What is the reason for the Python2 dependency? (Is it software written in Python, or does it just provide Python bindings, or use Python in the build system or test runner?) - What are the upstream/community plans/timelines regarding Python 3? - What is the guidance for porting to Python 3? (Assuming that there is someone who generally knows how to port to Python 3, but doesn't know anything about the particular package, what are the next steps to take?) This bug is filed semi-automatically, and might not have all the context specific to cppcheck. If you need anything from us, or something is unclear, please mention it here. Thank you.
sgrubb: the explicit Python2 dependence was added by you, but there's no description in the spec why. Could you fix this?
OK. Note added. FTR, htmlreport README.txt says it's written in python 2.7. The rpm macros for the build system enforces a rule that you cannot have env python as that makes migration to python 3 problematic. It emits the following error message at the end of the build: *** ERROR: ambiguous python shebang in /usr/bin/cppcheck-htmlreport: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31.
It seems that the htmlreport utility should be Python 3 compatible so it should be enough to just use sed to change the shebang line to Python 3 as suggested in the error message.
Indeed, it appears that the fix is as simple as switching to python3.
Thank you!
Could you please do one more build in rawhide? Right now it's strange that cppcheck-htmlreport-1.88-4.fc32.x86_64.rpm depends on Python 3 but cppcheck-htmlreport-1.88-4.fc31.x86_64.rpm still depends on Python 2. https://koji.fedoraproject.org/koji/rpminfo?rpmID=18675307 https://koji.fedoraproject.org/koji/rpminfo?rpmID=18493594
cppcheck-htmlreport-1.88-5.fc32 does not depend on Python 2. Thank you!