3bca83f
%if 0%{?fedora} || 0%{?rhel} >= 7
69a308e
%bcond_without python3
3bca83f
%else
3bca83f
%bcond_with python3
3bca83f
%endif
c026136
c026136
%global modname mccabe
c026136
Orion Poplawski d5cfc83
Name:               python-%{modname}
f2eb843
Version:            0.6.1
809066c
Release:            4%{?dist}
c026136
Summary:            McCabe complexity checker
c026136
c026136
Group:              Development/Libraries
c026136
License:            MIT
c026136
URL:                http://pypi.python.org/pypi/mccabe
ec55233
Source0:            https://files.pythonhosted.org/packages/source/m/%{modname}/%{modname}-%{version}.tar.gz
c026136
c026136
BuildArch:          noarch
63cd971
BuildRequires:      python2-devel
Orion Poplawski a374fdb
%if 0%{?fedora}
63cd971
BuildRequires:      python2-setuptools
63cd971
BuildRequires:      python2-pytest
Orion Poplawski a374fdb
BuildRequires:      python2-pytest-runner
63cd971
%else
63cd971
BuildRequires:      python-setuptools
63cd971
BuildRequires:      pytest
Orion Poplawski a374fdb
%endif
c026136
3bafb97
%if %{with python3}
Orion Poplawski d5cfc83
BuildRequires:      python%{python3_pkgversion}-devel, python%{python3_pkgversion}-setuptools
310fd4f
BuildRequires:      python%{python3_pkgversion}-pytest, python%{python3_pkgversion}-pytest-runner
c026136
%endif
c026136
c026136
%description
c026136
Ned's script to check McCabe complexity.
c026136
c026136
This module provides a plugin for ``flake8``, the Python code
c026136
checker.
c026136
Orion Poplawski d5cfc83
%package -n python2-%{modname}
Orion Poplawski d5cfc83
Summary:            McCabe checker, plugin for flake8
Orion Poplawski d5cfc83
Group:              Development/Libraries
Orion Poplawski d5cfc83
%{?python_provide:%python_provide python2-%{modname}}
Orion Poplawski d5cfc83
Orion Poplawski d5cfc83
%description -n python2-%{modname}
Orion Poplawski d5cfc83
Ned's script to check McCabe complexity.
Orion Poplawski d5cfc83
Orion Poplawski d5cfc83
This module provides a plugin for ``flake8``, the Python code
Orion Poplawski d5cfc83
checker.
3bafb97
Orion Poplawski d5cfc83
%package -n python%{python3_pkgversion}-%{modname}
c026136
Summary:            McCabe checker, plugin for flake8
c026136
Group:              Development/Libraries
Orion Poplawski d5cfc83
%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}}
Orion Poplawski d5cfc83
Orion Poplawski d5cfc83
%description -n python%{python3_pkgversion}-%{modname}
c026136
Ned's script to check McCabe complexity.
c026136
c026136
This module provides a plugin for ``flake8``, the Python code
c026136
checker.
c026136
c026136
%prep
c026136
%setup -q -n %{modname}-%{version}
Orion Poplawski a374fdb
# EL7 lacks python2-pytest-runner
Orion Poplawski a374fdb
%if 0%{?el7}
Orion Poplawski a374fdb
sed -i -e /pytest-runner/d setup.py
Orion Poplawski a374fdb
%endif
c026136
c026136
# Remove bundled egg-info in case it exists
c026136
rm -rf %{modname}.egg-info
c026136
c026136
%build
Orion Poplawski d5cfc83
%py2_build
3bafb97
%{?with_python3:%py3_build}
c026136
c026136
c026136
%install
3bafb97
%{?with_python3:%py3_install}
Orion Poplawski d5cfc83
%py2_install
c026136
c026136
%check
Orion Poplawski d5cfc83
py.test-%{python2_version}
3bafb97
%{?with_python3:py.test-3}
c026136
Orion Poplawski d5cfc83
%files -n python2-%{modname}
Orion Poplawski d5cfc83
%license LICENSE
c026136
%doc README.rst
Orion Poplawski d5cfc83
%{python2_sitelib}/%{modname}.py*
Orion Poplawski d5cfc83
%{python2_sitelib}/%{modname}-%{version}*
c026136
3bafb97
%if %{with python3}
Orion Poplawski d5cfc83
%files -n python%{python3_pkgversion}-%{modname}
Orion Poplawski d5cfc83
%license LICENSE
c026136
%doc README.rst
c026136
%{python3_sitelib}/%{modname}.py*
c026136
%{python3_sitelib}/%{modname}-%{version}-*
c026136
%{python3_sitelib}/__pycache__/%{modname}.*
c026136
%endif
c026136
c026136
%changelog
809066c
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-4
809066c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
809066c
f970d15
* Sun Jun 25 2017 Ville Skyttä <ville.skytta@iki.fi> - 0.6.1-3
63cd971
- Use explicit python2-* dependencies where available
3bca83f
- Build Python 3 version by default on EL7
63cd971
c67ec5a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-2
c67ec5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c67ec5a
f2eb843
* Fri Jan 27 2017 Ville Skyttä <ville.skytta@iki.fi> - 0.6.1-1
f2eb843
- Update to 0.6.1
f2eb843
56cdbe2
* Tue Jan 24 2017 Ville Skyttä <ville.skytta@iki.fi> - 0.6.0-1
56cdbe2
- Update to 0.6.0
56cdbe2
8164622
* Thu Jan 12 2017 Ville Skyttä <ville.skytta@iki.fi> - 0.5.3-1
8164622
- Update to 0.5.3
310fd4f
- Drop pytest-runner avoidance patch
310fd4f
789a89b
* Tue Dec 13 2016 Stratakis Charalampos <cstratak@redhat.com> - 0.5.2-3
789a89b
- Rebuild for Python 3.6
789a89b
Orion Poplawski d5cfc83
* Mon Oct 24 2016 Orion Poplawski <orion@cora.nwra.com> - 0.5.2-2
Orion Poplawski d5cfc83
- Enable python3 for EPEL
Orion Poplawski d5cfc83
- Ship python2-mccabe
Orion Poplawski d5cfc83
- Ship LICENSE
Orion Poplawski d5cfc83
- Modernize spec
Orion Poplawski d5cfc83
6bd1f55
* Sun Aug 14 2016 Ville Skyttä <ville.skytta@iki.fi> - 0.5.2-1
6bd1f55
- Update to 0.5.2
6bd1f55
1c83b3d
* Sat Aug 13 2016 Ville Skyttä <ville.skytta@iki.fi> - 0.5.0-3
ec9bc10
- Add python3-pytest build dep, patch to build/test without pytest-runner
1c83b3d
95f5543
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-2
95f5543
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
95f5543
69a308e
* Wed Jun 01 2016 Matěj Cepl <mcepl@redhat.com> - 0.5.0-1
69a308e
- Upstream upgrade
69a308e
6dd84a4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-2
6dd84a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6dd84a4
ad12247
* Thu Jan 28 2016 Matěj Cepl <mcepl@redhat.com> - 0.4.0-1
ad12247
- Upstream upgrade
ad12247
Robert Kuska c5644f5
* Fri Nov 06 2015 Robert Kuska <rkuska@redhat.com> - 0.2.1-8
Robert Kuska c5644f5
- Rebuilt for Python3.5 rebuild
Robert Kuska c5644f5
5457abf
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-7
5457abf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5457abf
8b3c82a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-6
8b3c82a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8b3c82a
2b3918d
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.2.1-5
2b3918d
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
2b3918d
ade49da
* Tue Apr 29 2014 Matěj Cepl <mcepl@redhat.com> - 0.2.1-4
c2cebf9
- Fix building on RHEL-7 (we really don’t have Python3)
c2cebf9
792773b
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-3
792773b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
792773b
c026136
* Mon Apr 15 2013 Matěj Cepl <mcepl@redhat.com> 0.2.1-2
c026136
- Fix %%changelog.
c026136
c026136
* Sun Apr 14 2013 Matěj Cepl <mcepl@redhat.com> 0.2.1-1
c026136
- initial package for Fedora