a3bb626
%global module_name pycodestyle
a3bb626
d7fa93b
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
afafb5c
%bcond_with python2
afafb5c
%else
6ad5246
%bcond_without python2
afafb5c
%endif
afafb5c
a3bb626
Name:           python-%{module_name}
47f268e
# WARNING: When updating pycodestyle, check not to break flake8!
36b7162
Version:        2.6.0
ebb3fb0
Release:        4%{?dist}
a3bb626
Summary:        Python style guide checker
a3bb626
License:        MIT
a3bb626
URL:            https://pypi.python.org/pypi/%{module_name}
36b7162
Source0:        %{pypi_source %{module_name}}
a3bb626
a3bb626
BuildArch:      noarch
a3bb626
a3bb626
%description
a3bb626
pycodestyle is a tool to check your Python code against some of the style
a3bb626
conventions in PEP 8. It has a plugin architecture, making new checks easy, and
a3bb626
its output is parseable, making it easy to jump to an error location in your
a3bb626
editor.
a3bb626
afafb5c
%if %{with python2}
a3bb626
%package -n python2-%{module_name}
a3bb626
Summary:        Python style guide checker
a3bb626
%{?python_provide:%python_provide python2-%{module_name}}
a3bb626
a3bb626
BuildRequires:  python2-devel
14f7e12
BuildRequires:  python2-setuptools
14f7e12
Requires:       python2-setuptools
a3bb626
a3bb626
a3bb626
%description -n python2-%{module_name}
a3bb626
pycodestyle is a tool to check your Python code against some of the style
a3bb626
conventions in PEP 8. It has a plugin architecture, making new checks easy, and
a3bb626
its output is parseable, making it easy to jump to an error location in your
a3bb626
editor.
afafb5c
%endif
a3bb626
a3bb626
Orion Poplawski 7e41de4
%package -n python%{python3_pkgversion}-pycodestyle
a3bb626
Summary:    Python style guide checker
a3bb626
%{?python_provide:%python_provide python%{python3_pkgversion}-%{module_name}}
8aed007
Conflicts:      python-pycodestyle < %{version}-%{release}
a3bb626
a3bb626
BuildRequires:  python%{python3_pkgversion}-devel
a3bb626
BuildRequires:  python%{python3_pkgversion}-setuptools
492b518
BuildRequires:  python%{python3_pkgversion}-sphinx
492b518
BuildRequires:  python%{python3_pkgversion}-sphinx_rtd_theme
ebb3fb0
BuildRequires:  make
a3bb626
a3bb626
%description -n python%{python3_pkgversion}-pycodestyle
a3bb626
pycodestyle is a tool to check your Python code against some of the style
a3bb626
conventions in PEP 8. It has a plugin architecture, making new checks easy, and
a3bb626
its output is parseable, making it easy to jump to an error location in your
a3bb626
editor.
a3bb626
a3bb626
This is a version for Python %{python3_pkgversion}.
a3bb626
a3bb626
a3bb626
%prep
a3bb626
%autosetup -n %{module_name}-%{version}
a3bb626
a3bb626
# Remove #! from pycodestyle.py
a3bb626
sed --in-place "s:#!\s*/usr.*::" pycodestyle.py
a3bb626
a3bb626
a3bb626
%build
afafb5c
%if %{with python2}
a3bb626
%py2_build
afafb5c
%endif
a3bb626
%py3_build
a3bb626
afafb5c
make -C docs man SPHINXBUILD=sphinx-build-%{python3_version}
a3bb626
a3bb626
a3bb626
%install
afafb5c
%if %{with python2}
8aed007
%py2_install
8aed007
mv %{buildroot}%{_bindir}/pycodestyle %{buildroot}%{_bindir}/pycodestyle-%{python2_version}
8aed007
ln -s ./pycodestyle-%{python2_version} %{buildroot}%{_bindir}/pycodestyle-2
afafb5c
%endif
8aed007
a3bb626
%py3_install
a3bb626
mv %{buildroot}%{_bindir}/pycodestyle %{buildroot}%{_bindir}/pycodestyle-%{python3_version}
a3bb626
ln -s ./pycodestyle-%{python3_version} %{buildroot}%{_bindir}/pycodestyle-3
8aed007
ln -s ./pycodestyle-3 %{buildroot}%{_bindir}/pycodestyle
a3bb626
a3bb626
a3bb626
install -D docs/_build/man/%{module_name}.1 %{buildroot}%{_mandir}/man1/%{module_name}.1
a3bb626
a3bb626
a3bb626
%check
afafb5c
%if %{with python2}
1588879
%{__python2} pycodestyle.py --max-doc-length=72 --testsuite testsuite
1588879
%{__python2} pycodestyle.py --max-doc-length=72 --doctest
afafb5c
%endif
1588879
%{__python3} pycodestyle.py --max-doc-length=72 --testsuite testsuite
1588879
%{__python3} pycodestyle.py --max-doc-length=72 --doctest
a3bb626
a3bb626
afafb5c
%if %{with python2}
a3bb626
%files -n python2-%{module_name}
a3bb626
%doc CHANGES.txt README.rst
492b518
%license LICENSE
a3bb626
%{_bindir}/pycodestyle-2
a3bb626
%{_bindir}/pycodestyle-2.7
a3bb626
%{python2_sitelib}/%{module_name}.py*
a3bb626
%{python2_sitelib}/%{module_name}-%{version}-*.egg-info
afafb5c
%endif
a3bb626
Orion Poplawski 7e41de4
%files -n python%{python3_pkgversion}-pycodestyle
a3bb626
%doc README.rst CHANGES.txt
492b518
%license LICENSE
a3bb626
%{_mandir}/man1/%{module_name}.1.gz
8aed007
%{_bindir}/pycodestyle
a3bb626
%{_bindir}/pycodestyle-3
3373820
%{_bindir}/pycodestyle-%{python3_version}
36b7162
%pycached %{python3_sitelib}/%{module_name}.py
a3bb626
%{python3_sitelib}/%{module_name}-%{version}-*.egg-info/
a3bb626
a3bb626
%changelog
ebb3fb0
* Thu Feb 18 2021 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-4
ebb3fb0
- Properly BuildRequire make
ebb3fb0
c7178c5
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-3
c7178c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
c7178c5
2e379ca
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-2
2e379ca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
2e379ca
36b7162
* Sun May 31 2020 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-1
36b7162
- Update to 2.6.0 (#1827430)
36b7162
29b5214
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-8
29b5214
- Rebuilt for Python 3.9
29b5214
48763ff
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-7
48763ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
48763ff
afafb5c
* Fri Nov 15 2019 Orion Poplawski <orion@nwra.com> - 2.5.0-6
afafb5c
- Drop python2 for Fedora 32+
afafb5c
3649409
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-5
3649409
- Rebuilt for Python 3.8.0rc1 (#1748018)
3649409
7ae8535
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-4
7ae8535
- Rebuilt for Python 3.8
7ae8535
84087fe
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-3
84087fe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
84087fe
8aed007
* Wed Jul 17 2019 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-2
8aed007
- Make /usr/bin/pycodestyle Python 3
8aed007
2967e01
* Wed Feb 20 2019 Matthias Runge <mrunge@redhat.com> - 2.5.0-1
2967e01
- update to 2.5.0 and fix FTBFS
2967e01
baaa05b
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-4
baaa05b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
baaa05b
ea8740f
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-3
ea8740f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
ea8740f
f8a6a2e
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 2.4.0-2
f8a6a2e
- Rebuilt for Python 3.7
f8a6a2e
492b518
* Sat Jun 02 2018 Miro Hrončok <mhroncok@redhat.com> - 2.4.0-1
492b518
- Update to 2.4.0 (#1565613)
492b518
2fd952b
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-2
2fd952b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2fd952b
14f7e12
* Thu Aug 24 2017 Lumír Balhar <lbalhar@redhat.com> 2.3.1-1
14f7e12
- New upstream version 2.3.1
14f7e12
- Use 'python2' instead of just 'python' in the names of dependencies
14f7e12
df2f03f
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-6
df2f03f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
df2f03f
Orion Poplawski 7e41de4
* Fri Mar 10 2017 Orion Poplawski <orion@cora.nwra.com> - 2.0.0-5
Orion Poplawski 7e41de4
- Fix python3 builds for EPEL
Orion Poplawski 7e41de4
- Cleanup spec
Orion Poplawski 7e41de4
a15fea3
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-4
a15fea3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a15fea3
fcdd1de
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.0.0-3
fcdd1de
- Rebuild for Python 3.6
fcdd1de
a3bb626
* Thu Aug  4 2016 Luke Macken <lmacken@redhat.com> - 2.0.0-2
a3bb626
- Use the new python setup/build/install macros
a3bb626
- Remove Obsoletes/Provides for pep8, since it is currently not a drop-in replacement.
a3bb626
  https://bugzilla.redhat.com/show_bug.cgi?id=1342839#c10
a3bb626
a3bb626
* Sun Jun 05 2016 Luke Macken <lmacken@redhat.com> - 2.0.0-1
a3bb626
- The pep8 project has been renamed to pycodestyle
a3bb626
- Create python2 subpackage
a3bb626
- Update the source url to use pypi.io
a3bb626
- Build a man page instead of html docs
a3bb626
a3bb626
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-4
a3bb626
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a3bb626
a3bb626
* Thu Nov 12 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-3
a3bb626
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
a3bb626
a3bb626
* Wed Nov 11 2015 Robert Kuska <rkuska@redhat.com> - 1.6.2-2
a3bb626
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
a3bb626
a3bb626
* Wed Nov 11 2015 Matthias Runge <mrunge@redhat.com> - 1.6.2-1
a3bb626
- update to 1.6.2
a3bb626
a3bb626
* Fri Nov 06 2015 Robert Kuska <rkuska@redhat.com> - 1.5.7-3
a3bb626
- Rebuilt for Python3.5 rebuild
a3bb626
a3bb626
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.7-2
a3bb626
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a3bb626
a3bb626
* Mon Oct 20 2014 Matthias Runge <mrunge@redhat.com> - 1.5.7-1
a3bb626
- update to 1.5.7
a3bb626
a3bb626
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.6-3
a3bb626
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a3bb626
a3bb626
* Thu May 15 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.5.6-2
a3bb626
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
a3bb626
a3bb626
* Wed May 14 2014 Matthias Runge <mrunge@redhat.com> - 1.5.6-1
a3bb626
- update to 1.5.6 (rhbz#1087351)
a3bb626
a3bb626
* Tue Apr 08 2014 Matthias Runge <mrunge@redhat.com> - 1.5.4-1
a3bb626
- require python3-setuptools (rhbz#1084756)
a3bb626
- update to 1.5.4 (rhbz#1081516)
a3bb626
a3bb626
* Wed Feb 26 2014 Matthias Runge <mrunge@redhat.com> -1.4.6-2
a3bb626
- rename py3 version of pep8 to python3-pep8 (rhbz#1060408)
a3bb626
a3bb626
* Tue Aug 13 2013 Ian Weller <iweller@redhat.com> - 1.4.6-1
a3bb626
- update to 1.4.6
a3bb626
a3bb626
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.5-2
a3bb626
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
a3bb626
a3bb626
* Fri Jun 14 2013 Matthias Runge <mrunge@redhat.com> - 1.4.5-1
a3bb626
- update to 1.4.5 (rhbz#918924)
a3bb626
- introduce py3 package (rhbz#971941)
a3bb626
a3bb626
* Tue Feb 26 2013 Ian Weller <iweller@redhat.com> - 1.4.4-1
a3bb626
- Update to 1.4.4
a3bb626
a3bb626
* Mon Feb 11 2013 Ian Weller <iweller@redhat.com> - 1.4.2-1
a3bb626
- Update to 1.4.2
a3bb626
a3bb626
* Tue Jan 29 2013 Ian Weller <iweller@redhat.com> - 1.4.1-1
a3bb626
- Update to 1.4.1
a3bb626
- Add Sphinx docs
a3bb626
a3bb626
* Fri Sep 07 2012 Ian Weller <iweller@redhat.com> - 1.3.3-3
a3bb626
- Run test suite using the pep8.py that has been installed
a3bb626
a3bb626
* Fri Sep 07 2012 Ian Weller <iweller@redhat.com> - 1.3.3-2
a3bb626
- Add test suite
a3bb626
a3bb626
* Thu Sep 06 2012 Ian Weller <iweller@redhat.com> - 1.3.3-1
a3bb626
- Update to 1.3.3
a3bb626
a3bb626
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-2
a3bb626
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
a3bb626
a3bb626
* Sat Jun 16 2012 Ian Weller <iweller@redhat.com> - 1.3-1
a3bb626
- Update to 1.3
a3bb626
a3bb626
* Sat Apr 07 2012 Ian Weller <iweller@redhat.com> - 1.0.1-1
a3bb626
- Update to 1.0.1
a3bb626
a3bb626
* Fri Jan 27 2012 Ian Weller <iweller@redhat.com> - 0.6.1-1
a3bb626
- Update to 0.6.1
a3bb626
a3bb626
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-4
a3bb626
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a3bb626
a3bb626
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-3
a3bb626
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a3bb626
a3bb626
* Fri Jan 21 2011 Ian Weller <iweller@redhat.com> - 0.6.0-2
a3bb626
- RHBZ 633102: Requires: python-setuptools
a3bb626
a3bb626
* Tue Nov 16 2010 Ian Weller <iweller@redhat.com> - 0.6.0-1
a3bb626
- Changed upstream (same code, new maintainer, new URL)
a3bb626
- New release
a3bb626
a3bb626
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.4.2-3
a3bb626
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
a3bb626
a3bb626
* Mon Nov  9 2009 Ian Weller <ian@ianweller.org> - 0.4.2-2
a3bb626
- Add BR: python-setuptools
a3bb626
- Change URL to the correct upstream
a3bb626
a3bb626
* Sun Nov  8 2009 Ian Weller <ian@ianweller.org> - 0.4.2-1
a3bb626
- Initial package build