Blob Blame History Raw
%global srcname flake8-import-order
%bcond_with pylama

Name:           python-%{srcname}
Version:        0.15
Release:        1%{?dist}
Summary:        Flake8 plugin for checking order of imports in Python code

License:        LGPLv3
URL:            https://github.com/PyCQA/%{srcname}
Source0:        https://files.pythonhosted.org/packages/source/f/%{srcname}/%{srcname}-%{version}.tar.gz
Patch0:         flake8-import-order-0.9.2-nolama.patch

BuildArch:      noarch

%description
%{summary}.


%package     -n python2-%{srcname}
Summary:        %{summary}
BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
BuildRequires:  python2-pytest
BuildRequires:  python-flake8
BuildRequires:  python2-pycodestyle
BuildRequires:  python2-asttokens
Requires:       python-flake8
Requires:       python2-pycodestyle
Requires:       python2-asttokens
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
%{summary}.

%package     -n python%{python3_pkgversion}-%{srcname}
Summary:        %{summary}
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools
BuildRequires:  python%{python3_pkgversion}-pytest
BuildRequires:  python%{python3_pkgversion}-flake8
BuildRequires:  python%{python3_pkgversion}-pycodestyle
BuildRequires:  python%{python3_pkgversion}-asttokens
Requires:       python%{python3_pkgversion}-flake8
Requires:       python%{python3_pkgversion}-pycodestyle
Requires:       python%{python3_pkgversion}-asttokens
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}

%description -n python%{python3_pkgversion}-%{srcname}
%{summary}.


%prep
%setup -q -n %{srcname}-%{version}
%if ! %{with pylama}
%patch0 -p1
rm tests/test_pylama_linter.py
%endif


%build
%py2_build
%py3_build


%install
%py2_install
%py3_install


%check
%if ! %{with pylama}
mv flake8_import_order/pylama_linter.py flake8_import_order/pylama_linter.NOT
%endif
%{__python2} -Wall setup.py test
%{__python3} -Wall setup.py test


%files -n python2-%{srcname}
%license COPYING
%doc README.rst
%{python2_sitelib}/*

%files -n python%{python3_pkgversion}-%{srcname}
%license COPYING
%doc README.rst
%{python3_sitelib}/*


%changelog
* Thu Nov  9 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.15-1
- Update to 0.15 (#1508184)

* Mon Nov  6 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.14.3-1
- Update to 0.14.2 (#1508184)

* Sun Jul 30 2017 Ville Skyttä <ville.skytta@iki.fi> - 0.13-1
- Update to 0.13

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri May 26 2017 Ville Skyttä <ville.skytta@iki.fi> - 0.12-2
- Run tests with -Wall

* Tue Feb 14 2017 Ville Skyttä <ville.skytta@iki.fi> - 0.12-1
- Update to 0.12

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.11-2
- Rebuild for Python 3.6

* Fri Nov 11 2016 Ville Skyttä <ville.skytta@iki.fi> - 0.11-1
- Update to 0.11

* Mon Oct 24 2016 Orion Poplawski <orion@cora.nwra.com> - 0.9.2-2
- Use %%license
- Minor spec cleanup

* Sun Sep 18 2016 Ville Skyttä <ville.skytta@iki.fi> - 0.9.2-1
- Update to 0.9.2

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Dec 30 2015 Ville Skyttä <ville.skytta@iki.fi> - 0.6.1-1
- First build