|
|
f4fd9d0 |
%if 0%{?fedora}
|
|
|
30354bf |
%bcond_without python3
|
|
|
30354bf |
%else
|
|
|
30354bf |
%bcond_with python3
|
|
|
30354bf |
%endif
|
|
|
30354bf |
|
|
|
30354bf |
%global modname flake8
|
|
|
30354bf |
|
|
|
30354bf |
Name: python-%{modname}
|
|
|
7660157 |
Version: 2.5.1
|
|
|
7660157 |
Release: 1%{?dist}
|
|
|
30354bf |
Summary: Code checking using pep8 and pyflakes
|
|
|
30354bf |
|
|
|
30354bf |
Group: Development/Languages
|
|
|
30354bf |
License: MIT
|
|
|
30354bf |
URL: http://pypi.python.org/pypi/%{modname}
|
|
|
30354bf |
Source0: http://pypi.python.org/packages/source/f/%{modname}/%{modname}-%{version}.tar.gz
|
|
|
30354bf |
|
|
|
30354bf |
BuildArch: noarch
|
|
|
52ce2a8 |
BuildRequires: python2-devel
|
|
|
52ce2a8 |
BuildRequires: python-nose
|
|
|
52ce2a8 |
BuildRequires: python-setuptools
|
|
|
85650a6 |
BuildRequires: python-mccabe >= 0.2.1
|
|
|
f3c406b |
BuildRequires: python-pep8 >= 1.5.7
|
|
|
f3c406b |
BuildRequires: pyflakes >= 0.8.1
|
|
|
94f2190 |
BuildRequires: python-mock
|
|
|
85650a6 |
Requires: python-mccabe >= 0.2.1
|
|
|
f3c406b |
Requires: python-pep8 >= 1.5.7
|
|
|
f3c406b |
Requires: pyflakes >= 0.8.1
|
|
|
52ce2a8 |
Requires: python-setuptools
|
|
|
30354bf |
|
|
|
30354bf |
%description
|
|
|
c73f41a |
Flake8 is a wrapper around PyFlakes, pep8, and Ned's McCabe script. It
|
|
|
c73f41a |
runs all the tools by launching the single flake8 script, and displays
|
|
|
c73f41a |
the warnings in a per-file, merged output.
|
|
|
30354bf |
|
|
|
c73f41a |
It also adds a few features: files that contain "# flake8: noqa" are
|
|
|
c73f41a |
skipped, lines that contain a "# noqa" comment at the end will not
|
|
|
c73f41a |
issue warnings, Git and Mercurial hooks are included, a McCabe
|
|
|
c73f41a |
complexity checker is included, and it is extendable through
|
|
|
c73f41a |
flake8.extension entry points.
|
|
|
30354bf |
|
|
|
30354bf |
|
|
|
30354bf |
%if %{with python3}
|
|
|
30354bf |
%package -n python3-%{modname}
|
|
|
30354bf |
Summary: Code checking using pep8 and pyflakes
|
|
|
30354bf |
Group: Development/Languages
|
|
|
30354bf |
|
|
|
52ce2a8 |
Requires: python3-setuptools
|
|
|
85650a6 |
Requires: python3-mccabe >= 0.2.1
|
|
|
f3c406b |
Requires: python3-pep8 >= 1.5.7
|
|
|
52ce2a8 |
Requires: python3-pyflakes >= 0.6.1
|
|
|
52ce2a8 |
|
|
|
e88440c |
BuildRequires: python3-devel
|
|
|
e88440c |
BuildRequires: python3-setuptools
|
|
|
e88440c |
BuildRequires: python3-nose
|
|
|
85650a6 |
BuildRequires: python3-mccabe >= 0.2.1
|
|
|
e88440c |
BuildRequires: python3-pep8 >= 1.5.7
|
|
|
e88440c |
BuildRequires: python3-pyflakes >= 0.8.1
|
|
|
e88440c |
BuildRequires: python3-mock
|
|
|
e88440c |
|
|
|
30354bf |
%description -n python3-%{modname}
|
|
|
c73f41a |
Flake8 is a wrapper around PyFlakes, pep8, and Ned's McCabe script. It
|
|
|
c73f41a |
runs all the tools by launching the single flake8 script, and displays
|
|
|
c73f41a |
the warnings in a per-file, merged output.
|
|
|
30354bf |
|
|
|
c73f41a |
It also adds a few features: files that contain "# flake8: noqa" are
|
|
|
c73f41a |
skipped, lines that contain a "# noqa" comment at the end will not
|
|
|
c73f41a |
issue warnings, Git and Mercurial hooks are included, a McCabe
|
|
|
c73f41a |
complexity checker is included, and it is extendable through
|
|
|
c73f41a |
flake8.extension entry points.
|
|
|
30354bf |
|
|
|
30354bf |
This is version of the package running with Python 3.
|
|
|
30354bf |
%endif
|
|
|
30354bf |
|
|
|
30354bf |
|
|
|
30354bf |
%prep
|
|
|
e88440c |
%setup -qc
|
|
|
e88440c |
mv %{modname}-%{version} python2
|
|
|
30354bf |
|
|
|
e88440c |
# remove bundled egg-info
|
|
|
f4fd9d0 |
rm -r flake8.egg-info
|
|
|
d3c78c5 |
# ...and byte-compiled files
|
|
|
d3c78c5 |
find . -name __pycache__ -o -name "*.pyc" -print0 | xargs -0 rm -r
|
|
|
d3c78c5 |
|
|
|
e88440c |
pushd python2
|
|
|
30354bf |
|
|
|
e88440c |
# copy README.1st CONTRIBUTORS.txt
|
|
|
e88440c |
cp -a README.rst ..
|
|
|
e88440c |
cp -a CONTRIBUTORS.txt ..
|
|
|
e88440c |
|
|
|
e88440c |
# remove requirements from setup.py, handled by rpm.
|
|
|
e88440c |
sed -i '/"pyflakes.*"/d' setup.py
|
|
|
e88440c |
sed -i '/"pep8.*"/d' setup.py
|
|
|
e88440c |
sed -i '/"mccabe .*"/d' setup.py
|
|
|
f4fd9d0 |
|
|
|
e88440c |
popd
|
|
|
30354bf |
|
|
|
e88440c |
%if %{with python3}
|
|
|
e88440c |
cp -a python2 python3
|
|
|
e88440c |
find python3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
|
|
30354bf |
%endif
|
|
|
30354bf |
|
|
|
30354bf |
|
|
|
30354bf |
%build
|
|
|
e88440c |
pushd python2
|
|
|
30354bf |
%{__python2} setup.py build
|
|
|
e88440c |
popd
|
|
|
30354bf |
|
|
|
30354bf |
%if %{with python3}
|
|
|
e88440c |
pushd python3
|
|
|
30354bf |
%{__python3} setup.py build
|
|
|
30354bf |
popd
|
|
|
30354bf |
%endif
|
|
|
30354bf |
|
|
|
30354bf |
%install
|
|
|
30354bf |
# Must do the python3 install first because the scripts in /usr/bin are
|
|
|
30354bf |
# overwritten with every setup.py install (and we want the python2 version
|
|
|
30354bf |
# to be the default for now).
|
|
|
30354bf |
%if %{with python3}
|
|
|
e88440c |
pushd python3
|
|
|
30354bf |
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
30354bf |
mv %{buildroot}%{_bindir}/flake8 %{buildroot}%{_bindir}/python3-flake8
|
|
|
30354bf |
popd
|
|
|
30354bf |
%endif
|
|
|
30354bf |
|
|
|
e88440c |
pushd python2
|
|
|
30354bf |
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
|
|
e88440c |
popd
|
|
|
30354bf |
|
|
|
30354bf |
|
|
|
30354bf |
%check
|
|
|
e88440c |
pushd python2
|
|
|
30354bf |
%{__python2} setup.py nosetests --verbosity=2
|
|
|
e88440c |
popd
|
|
|
30354bf |
%if %{with python3}
|
|
|
e88440c |
pushd python3
|
|
|
30354bf |
%{__python3} setup.py nosetests --verbosity=2
|
|
|
e88440c |
popd
|
|
|
30354bf |
%endif
|
|
|
30354bf |
|
|
|
30354bf |
%files
|
|
|
30354bf |
%doc README.rst CONTRIBUTORS.txt
|
|
|
30354bf |
%{_bindir}/%{modname}
|
|
|
30354bf |
%{python_sitelib}/%{modname}*
|
|
|
30354bf |
|
|
|
30354bf |
%if %{with python3}
|
|
|
30354bf |
%files -n python3-%{modname}
|
|
|
30354bf |
%doc README.rst CONTRIBUTORS.txt
|
|
|
30354bf |
%{_bindir}/python3-flake8
|
|
|
30354bf |
%{python3_sitelib}/%{modname}*
|
|
|
30354bf |
%endif
|
|
|
30354bf |
|
|
|
30354bf |
|
|
|
30354bf |
%changelog
|
|
|
7660157 |
* Wed Dec 30 2015 Ville Skyttä <ville.skytta@iki.fi> - 2.5.1-1
|
|
|
7660157 |
- Update to 2.5.1 (rhbz#1289545)
|
|
|
7660157 |
|
|
|
04aab87 |
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-3
|
|
|
04aab87 |
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
04aab87 |
|
|
|
a198995 |
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-2
|
|
|
a198995 |
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
a198995 |
|
|
|
66c8897 |
* Mon Nov 02 2015 Matthias Runge <mrunge@redhat.com> - 2.5.0-1
|
|
|
66c8897 |
- update to 2.5.0 (rhbz#1275447)
|
|
|
66c8897 |
|
|
|
c73f41a |
* Mon Oct 26 2015 Ville Skyttä <ville.skytta@iki.fi> - 2.4.1-3
|
|
|
c73f41a |
- Update/improve description
|
|
|
c73f41a |
|
|
|
e88440c |
* Mon Jul 06 2015 Matthias Runge <mrunge@redhat.com> - 2.4.1-2
|
|
|
e88440c |
- fix FTBFS (rhbz#1239837)
|
|
|
e88440c |
|
|
|
6755173 |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-2
|
|
|
6755173 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
6755173 |
|
|
|
821dfe2 |
* Thu May 21 2015 Matej Cepl <mcepl@redhat.com> - 2.4.1-1
|
|
|
821dfe2 |
- update to 2.4.1 (rhbz#1178814)
|
|
|
821dfe2 |
|
|
|
f3c406b |
* Mon Oct 20 2014 Matthias Runge <mrunge@redhat.com> - 2.2.5-1
|
|
|
f3c406b |
- update to 2.2.5 (rhbz#1132878)
|
|
|
f3c406b |
|
|
|
bb54326 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-3
|
|
|
bb54326 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
bb54326 |
|
|
|
835f348 |
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.1.0-2
|
|
|
835f348 |
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
|
|
|
835f348 |
|
|
|
9676920 |
* Wed Apr 09 2014 Matthias Runge <mrunge@redhat.com> - 2.1.0-1
|
|
|
9676920 |
- update to 2.1.0
|
|
|
9676920 |
|
|
|
52ce2a8 |
* Thu Jan 02 2014 Matthias Runge <mrunge@redhat.com> - 2.0-5
|
|
|
52ce2a8 |
- add missing requires to pep8, python-mccabe and pyflakes (rhbz#1046955)
|
|
|
52ce2a8 |
|
|
|
30354bf |
* Mon Nov 18 2013 Matthias Runge <mrunge@redhat.com> - 2.0-4
|
|
|
30354bf |
- use __python2 instead of __python
|
|
|
30354bf |
- add CONTRIBUTORS.txt to py3 docs
|
|
|
30354bf |
|
|
|
30354bf |
* Tue Nov 05 2013 Matthias Runge <mrunge@redhat.com> - 2.0-3
|
|
|
30354bf |
- minimal spec cleanup, fix one rpmlint warning
|
|
|
30354bf |
|
|
|
30354bf |
* Sat Sep 08 2012 Matej Cepl <mcepl@redhat.com> - 1.4-2
|
|
|
30354bf |
- Update .spec file according to ongoing packaging review.
|
|
|
30354bf |
|
|
|
30354bf |
* Tue Jul 10 2012 Matej Cepl <mcepl@redhat.com> - 1.4-1
|
|
|
30354bf |
- initial package for Fedora
|
|
|
30354bf |
|