| |
@@ -4,10 +4,18 @@
|
| |
%global defaultpython 2
|
| |
%endif
|
| |
|
| |
+ %if 0%{?rhel} > 7
|
| |
+ %global with_python2 0
|
| |
+ %else
|
| |
+ %global with_python2 1
|
| |
+ %endif
|
| |
+
|
| |
+
|
| |
+
|
| |
Name: pyflakes
|
| |
# WARNING: When updating pyflakes, check not to break flake8!
|
| |
Version: 2.0.0
|
| |
- Release: 2%{?dist}
|
| |
+ Release: 3%{?dist}
|
| |
Summary: A simple program which checks Python source files for errors
|
| |
|
| |
License: MIT
|
| |
@@ -18,8 +26,10 @@
|
| |
Patch0: %{name}-1.1.0-python3-man.patch
|
| |
|
| |
BuildArch: noarch
|
| |
+ %if %{with_python2}
|
| |
BuildRequires: python2-devel >= 2.7
|
| |
BuildRequires: python2-setuptools
|
| |
+ %endif
|
| |
|
| |
%global desc Pyflakes is similar to PyChecker in scope, but differs in that it does\
|
| |
not execute the modules to check them. This is both safer and faster,\
|
| |
@@ -32,6 +42,7 @@
|
| |
|
| |
%description %_description
|
| |
|
| |
+ %if %{with_python2}
|
| |
%package -n python2-pyflakes
|
| |
Summary: %summary
|
| |
Requires: python2-setuptools
|
| |
@@ -41,6 +52,7 @@
|
| |
Obsoletes: pyflakes < %{version}-%{release}
|
| |
|
| |
%description -n python2-pyflakes %_description
|
| |
+ %endif
|
| |
|
| |
%package -n python%{python3_pkgversion}-%{name}
|
| |
Summary: %{summary}
|
| |
@@ -57,7 +69,9 @@
|
| |
%patch0 -p1
|
| |
|
| |
%build
|
| |
+ %if %{with_python2}
|
| |
%py2_build
|
| |
+ %endif
|
| |
%py3_build
|
| |
|
| |
%install
|
| |
@@ -72,11 +86,13 @@
|
| |
ln -s pyflakes-3 %{buildroot}%{_bindir}/python3-pyflakes
|
| |
ln -s pyflakes-3.1 %{buildroot}%{_mandir}/man1/python3-pyflakes.1
|
| |
|
| |
+ %if %{with_python2}
|
| |
%py2_install
|
| |
mv %{buildroot}%{_bindir}/pyflakes %{buildroot}%{_bindir}/pyflakes-%{python2_version}
|
| |
ln -s pyflakes-%{python2_version} %{buildroot}%{_bindir}/pyflakes-2
|
| |
install -Dpm 644 debian/pyflakes.1 %{buildroot}%{_mandir}/man1/pyflakes-%{python2_version}.1
|
| |
ln -s pyflakes-%{python2_version}.1 %{buildroot}%{_mandir}/man1/pyflakes-2.1
|
| |
+ %endif
|
| |
|
| |
ln -s pyflakes-%{defaultpython} %{buildroot}%{_bindir}/pyflakes
|
| |
ln -s pyflakes-%{defaultpython}.1 %{buildroot}%{_mandir}/man1/pyflakes.1
|
| |
@@ -85,6 +101,7 @@
|
| |
%{__python2} -Wall setup.py test
|
| |
%{__python3} -Wall setup.py test
|
| |
|
| |
+ %if %{with_python2}
|
| |
%files -n python2-pyflakes
|
| |
%license LICENSE
|
| |
%doc AUTHORS NEWS.txt README.rst
|
| |
@@ -98,6 +115,7 @@
|
| |
%{_bindir}/pyflakes
|
| |
%{_mandir}/man1/pyflakes.1*
|
| |
%endif
|
| |
+ %endif
|
| |
|
| |
%files -n python%{python3_pkgversion}-%{name}
|
| |
%license LICENSE
|
| |
@@ -116,6 +134,10 @@
|
| |
%endif
|
| |
|
| |
%changelog
|
| |
+ * Fri Jun 22 2018 Sandro Bonazzola <sbonazzo@redhat.com> - 2.0.0-3
|
| |
+ - Drop python2 support on RHEL 8
|
| |
+ - Resolves: BZ#1594150
|
| |
+
|
| |
* Fri Jun 15 2018 Miro HronĨok <mhroncok@redhat.com> - 2.0.0-2
|
| |
- Rebuilt for Python 3.7
|
| |
|
| |
Resolves: BZ#1594150