| |
@@ -1,9 +1,16 @@
|
| |
%global srcname flake8-import-order
|
| |
%bcond_with pylama
|
| |
|
| |
+ %if 0%{?rhel} > 7
|
| |
+ # Disable python2 build by default
|
| |
+ %bcond_with python2
|
| |
+ %else
|
| |
+ %bcond_without python2
|
| |
+ %endif
|
| |
+
|
| |
Name: python-%{srcname}
|
| |
- Version: 0.15
|
| |
- Release: 3%{?dist}
|
| |
+ Version: 0.17.1
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Flake8 plugin for checking order of imports in Python code
|
| |
|
| |
License: LGPLv3
|
| |
@@ -17,6 +24,7 @@
|
| |
%{summary}.
|
| |
|
| |
|
| |
+ %if %{with python2}
|
| |
%package -n python2-%{srcname}
|
| |
Summary: %{summary}
|
| |
BuildRequires: python2-devel
|
| |
@@ -32,6 +40,7 @@
|
| |
|
| |
%description -n python2-%{srcname}
|
| |
%{summary}.
|
| |
+ %endif
|
| |
|
| |
%package -n python%{python3_pkgversion}-%{srcname}
|
| |
Summary: %{summary}
|
| |
@@ -46,6 +55,10 @@
|
| |
Requires: python%{python3_pkgversion}-asttokens
|
| |
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
| |
|
| |
+ %if %{without python2}
|
| |
+ Obsoletes: python2-%{srcname} < %{version}-%{release}
|
| |
+ %endif
|
| |
+
|
| |
%description -n python%{python3_pkgversion}-%{srcname}
|
| |
%{summary}.
|
| |
|
| |
@@ -59,12 +72,12 @@
|
| |
|
| |
|
| |
%build
|
| |
- %py2_build
|
| |
+ %{?with_python2:%py2_build}
|
| |
%py3_build
|
| |
|
| |
|
| |
%install
|
| |
- %py2_install
|
| |
+ %{?with_python2:%py2_install}
|
| |
%py3_install
|
| |
|
| |
|
| |
@@ -72,14 +85,16 @@
|
| |
%if ! %{with pylama}
|
| |
mv flake8_import_order/pylama_linter.py flake8_import_order/pylama_linter.NOT
|
| |
%endif
|
| |
- %{__python2} -Wall setup.py test
|
| |
+ %{?with_python2:%{__python2} -Wall setup.py test}
|
| |
%{__python3} -Wall setup.py test
|
| |
|
| |
|
| |
+ %if %{with python2}
|
| |
%files -n python2-%{srcname}
|
| |
%license COPYING
|
| |
%doc README.rst
|
| |
%{python2_sitelib}/*
|
| |
+ %endif
|
| |
|
| |
%files -n python%{python3_pkgversion}-%{srcname}
|
| |
%license COPYING
|
| |
@@ -88,6 +103,10 @@
|
| |
|
| |
|
| |
%changelog
|
| |
+ * Mon Mar 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.17.1-1
|
| |
+ - Update to 0.17.1 (#1544280)
|
| |
+ - Conditionalize the Python 2 subpackage
|
| |
+
|
| |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.15-3
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
| |
|
| |