#3 F28 branch: Update to 0.17.1, Conditionalize the Python 2 subpackage
Closed 6 years ago by zbyszek. Opened 6 years ago by churchyard.

@@ -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

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (flake8-import-order-0.15.tar.gz) = 711ce210af840d6971c76cf2052cf73ff85128e60d4d3c68e199e907469393cba2f1bdfa858ec690bdae479d5b4c13c565f549849e79aba7ec14c25d4afa0faf

+ SHA512 (flake8-import-order-0.17.1.tar.gz) = 15a4e8cdc7d96f66237cad0dfceba70b6278cf2176aa38a3fe46e59d11707733f88218f51eb8f939216b55f5cc201eb932a6c527bedb0ca4bee033f0e0cc07b1

no initial comment

Oh, I already built the change in F28 based on the commits to master.

Pull-Request has been closed by zbyszek

6 years ago