Use python3 on EPEL7

- Drop cppcheck-1.90-htmlreport-python2.patch
This commit is contained in:
Wolfgang Stöggl 2019-12-24 09:43:01 +01:00
parent 4dfe61b414
commit f6b2db4516
2 changed files with 6 additions and 36 deletions

View File

@ -1,27 +0,0 @@
diff -up cppcheck-1.90/htmlreport/cppcheck-htmlreport.orig cppcheck-1.90/htmlreport/cppcheck-htmlreport
--- cppcheck-1.90/htmlreport/cppcheck-htmlreport.orig 2019-12-21 11:51:10.000000000 +0100
+++ cppcheck-1.90/htmlreport/cppcheck-htmlreport 2019-12-22 10:56:52.071627890 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
from __future__ import unicode_literals
diff -up cppcheck-1.90/htmlreport/setup.py.orig cppcheck-1.90/htmlreport/setup.py
--- cppcheck-1.90/htmlreport/setup.py.orig 2019-12-21 11:51:10.000000000 +0100
+++ cppcheck-1.90/htmlreport/setup.py 2019-12-22 10:56:51.984631669 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
from setuptools import setup
diff -up cppcheck-1.90/htmlreport/test_htmlreport.py.orig cppcheck-1.90/htmlreport/test_htmlreport.py
--- cppcheck-1.90/htmlreport/test_htmlreport.py.orig 2019-12-21 11:51:10.000000000 +0100
+++ cppcheck-1.90/htmlreport/test_htmlreport.py 2019-12-22 10:56:52.012630453 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
"""Test cppcheck-htmlreport."""
import os

View File

@ -3,7 +3,7 @@
Name: cppcheck
Version: 1.90
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Tool for static C/C++ code analysis
License: GPLv3+
URL: http://cppcheck.wiki.sourceforge.net/
@ -15,8 +15,6 @@ Patch0: cppcheck-1.90-tinyxml.patch
Patch1: cppcheck-1.89-translations.patch
# Select python3 explicitly
Patch2: cppcheck-1.88-htmlreport-python3.patch
# for RHEL7 we still have python2
Patch3: cppcheck-1.90-htmlreport-python2.patch
BuildRequires: gcc-c++
BuildRequires: pcre-devel
@ -32,7 +30,7 @@ BuildRequires: zlib-devel
# no qt5-devel metapackage!
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-linguist
BuildRequires: python-devel
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: cmake3
%else
BuildRequires: qt5-devel
@ -64,7 +62,7 @@ Summary: HTML reporting for cppcheck
Requires: %{name}%{?_isa} = %{version}-%{release}
%if 0%{?rhel} == 7
# RHEL packages aren't versioned
Requires: python-pygments
Requires: python%{python3_pkgversion}-pygments
%else
Requires: python3-pygments
%endif
@ -77,11 +75,7 @@ from xml files first generated using cppcheck.
%setup -q
%patch0 -p1 -b .tinyxml
%patch1 -p1 -b .translations
%if 0%{?rhel} == 7
%patch3 -p1 -b .python2
%else
%patch2 -p1 -b .python3
%endif
# Make sure bundled tinyxml is not used
rm -r externals/tinyxml
@ -143,6 +137,9 @@ cd objdir-%{_target_platform}/bin
%{_bindir}/cppcheck-htmlreport
%changelog
* Tue Dec 24 2019 Wolfgang Stöggl <c72578@yahoo.de> - 1.90-4
- Use python3 on EPEL7
* Mon Dec 23 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.90-3
- Fix typo in CMake flag (Stöggl's pull request #3).