eb9cdc0
%if 0%{?fedora} > 26 || 0%{?rhel} > 7
eb9cdc0
%global defaultpython 3
eb9cdc0
%else
eb9cdc0
%global defaultpython 2
eb9cdc0
%endif
eb9cdc0
a242d84
Name:           pyflakes
3ec6b74
# WARNING: When updating pyflakes, check not to break flake8!
0721562
Version:        2.0.0
5a834ec
Release:        2%{?dist}
2cf98b5
Summary:        A simple program which checks Python source files for errors
a242d84
a242d84
License:        MIT
161a3d6
URL:            https://github.com/PyCQA/pyflakes
a242d84
161a3d6
Source0:        https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
0721562
Source1:        http://cdn.debian.net/debian/pool/main/p/pyflakes/pyflakes_1.6.0-1.debian.tar.xz
e6bec88
Patch0:         %{name}-1.1.0-python3-man.patch
a242d84
a242d84
BuildArch:      noarch
0721562
BuildRequires:  python2-devel >= 2.7
392ae3d
BuildRequires:  python2-setuptools
2cf98b5
2cf98b5
%global desc Pyflakes is similar to PyChecker in scope, but differs in that it does\
2cf98b5
not execute the modules to check them. This is both safer and faster,\
2cf98b5
although it does not perform as many checks. Unlike PyLint, Pyflakes\
2cf98b5
checks only for logical errors in programs; it does not perform any\
2cf98b5
check on style.
a242d84
af1c2ee
%global _description\
2cf98b5
%{desc}
2cf98b5
af1c2ee
%description %_description
af1c2ee
af1c2ee
%package -n python2-pyflakes
af1c2ee
Summary: %summary
392ae3d
Requires:       python2-setuptools
af1c2ee
%{?python_provide:%python_provide python2-pyflakes}
af1c2ee
# Remove before F30
af1c2ee
Provides: pyflakes = %{version}-%{release}
af1c2ee
Obsoletes: pyflakes < %{version}-%{release}
af1c2ee
af1c2ee
%description -n python2-pyflakes %_description
af1c2ee
357da2b
%package -n python%{python3_pkgversion}-%{name}
2cf98b5
Summary:        %{summary}
357da2b
BuildRequires:  python%{python3_pkgversion}-devel
357da2b
BuildRequires:  python%{python3_pkgversion}-setuptools
357da2b
Requires:       python%{python3_pkgversion}-setuptools
357da2b
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
2cf98b5
357da2b
%description -n python%{python3_pkgversion}-%{name}
2cf98b5
%{desc}
a242d84
a242d84
%prep
68bb628
%setup -q -a 1
f733b1d
%patch0 -p1
a242d84
a242d84
%build
68bb628
%py2_build
42fd1df
%py3_build
a242d84
a242d84
%install
42fd1df
rm -rf %{buildroot}
eb9cdc0
68bb628
%py3_install
5fb19c2
mv %{buildroot}%{_bindir}/pyflakes %{buildroot}%{_bindir}/pyflakes-%{python3_version}
5fb19c2
ln -s pyflakes-%{python3_version} %{buildroot}%{_bindir}/pyflakes-3
eb9cdc0
install -Dpm 644 debian/pyflakes3.1 %{buildroot}%{_mandir}/man1/pyflakes-%{python3_version}.1
5fb19c2
ln -s pyflakes-%{python3_version}.1 %{buildroot}%{_mandir}/man1/pyflakes-3.1
5fb19c2
# python3-pyflakes: backwards compat
5fb19c2
ln -s pyflakes-3 %{buildroot}%{_bindir}/python3-pyflakes
5fb19c2
ln -s pyflakes-3.1 %{buildroot}%{_mandir}/man1/python3-pyflakes.1
eb9cdc0
68bb628
%py2_install
5fb19c2
mv %{buildroot}%{_bindir}/pyflakes %{buildroot}%{_bindir}/pyflakes-%{python2_version}
5fb19c2
ln -s pyflakes-%{python2_version} %{buildroot}%{_bindir}/pyflakes-2
eb9cdc0
install -Dpm 644 debian/pyflakes.1 %{buildroot}%{_mandir}/man1/pyflakes-%{python2_version}.1
eb9cdc0
ln -s pyflakes-%{python2_version}.1 %{buildroot}%{_mandir}/man1/pyflakes-2.1
eb9cdc0
eb9cdc0
ln -s pyflakes-%{defaultpython} %{buildroot}%{_bindir}/pyflakes
eb9cdc0
ln -s pyflakes-%{defaultpython}.1 %{buildroot}%{_mandir}/man1/pyflakes.1
91df426
91df426
%check
f65308a
%{__python2} -Wall setup.py test
f65308a
%{__python3} -Wall setup.py test
a242d84
af1c2ee
%files -n python2-pyflakes
68bb628
%license LICENSE
297b543
%doc AUTHORS NEWS.txt README.rst
5fb19c2
%{_bindir}/pyflakes-%{python2_version}
5fb19c2
%{_bindir}/pyflakes-2
91df426
%{python_sitelib}/pyflakes*
91df426
%exclude %{python_sitelib}/pyflakes/test/
5fb19c2
%{_mandir}/man1/pyflakes-%{python2_version}.1*
5fb19c2
%{_mandir}/man1/pyflakes-2.1*
eb9cdc0
%if %{defaultpython} == 2
eb9cdc0
%{_bindir}/pyflakes
06b3afa
%{_mandir}/man1/pyflakes.1*
eb9cdc0
%endif
a242d84
357da2b
%files -n python%{python3_pkgversion}-%{name}
68bb628
%license LICENSE
297b543
%doc AUTHORS NEWS.txt README.rst
5fb19c2
%{_bindir}/pyflakes-%{python3_version}
5fb19c2
%{_bindir}/pyflakes-3
2cf98b5
%{_bindir}/python3-pyflakes
2cf98b5
%{python3_sitelib}/pyflakes*
2cf98b5
%exclude %{python3_sitelib}/pyflakes/test/
5fb19c2
%{_mandir}/man1/pyflakes-%{python3_version}.1*
5fb19c2
%{_mandir}/man1/pyflakes-3.1*
2cf98b5
%{_mandir}/man1/python3-pyflakes.1*
eb9cdc0
%if %{defaultpython} == 3
eb9cdc0
%{_bindir}/pyflakes
eb9cdc0
%{_mandir}/man1/pyflakes.1*
eb9cdc0
%endif
2cf98b5
a242d84
%changelog
5a834ec
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 2.0.0-2
5a834ec
- Rebuilt for Python 3.7
5a834ec
0721562
* Mon May 21 2018 Sandro Bonazzola <sandro.bonazzola@gmail.com> - 2.0.0-1
0721562
- Rebase on upstream 2.0.0
0721562
- Refresh Debian additions tarball to 1.6.0-1.
0721562
- Resolves: BZ#1580183
0721562
2b16a3d
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-4
2b16a3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2b16a3d
392ae3d
* Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.6.0-3
392ae3d
- Update Python 2 dependency declarations to new packaging standards
392ae3d
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
392ae3d
af1c2ee
* Sun Dec 17 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.6.0-2
af1c2ee
- Python 2 binary package renamed to python2-pyflakes
af1c2ee
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
af1c2ee
78e505d
* Thu Aug  3 2017 Ville Skyttä <ville.skytta@iki.fi> - 1.6.0-1
78e505d
- Update to 1.6.0
78e505d
3c14275
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-5
3c14275
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3c14275
48ef1d4
* Fri Jun 30 2017 Ville Skyttä <ville.skytta@iki.fi> - 1.5.0-4
eb9cdc0
- Point unversioned pyflakes executable to Python 3 in F27+ and EL8+
d54a85c
- Provide python2-pyflakes
d54a85c
f65308a
* Fri May 26 2017 Ville Skyttä <ville.skytta@iki.fi> - 1.5.0-3
f65308a
- Run tests with -Wall
f65308a
37daa43
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-2
37daa43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
37daa43
a7ea47e
* Wed Jan 11 2017 Ville Skyttä <ville.skytta@iki.fi> - 1.5.0-1
a7ea47e
- Update to 1.5.0
a7ea47e
e47cf8f
* Sun Jan  1 2017 Ville Skyttä <ville.skytta@iki.fi> - 1.4.0-1
e47cf8f
- Update to 1.4.0
e47cf8f
b9d8b0a
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.3.0-4
b9d8b0a
- Rebuild for Python 3.6
b9d8b0a
42fd1df
* Thu Dec  8 2016 Ville Skyttä <ville.skytta@iki.fi> - 1.3.0-3
42fd1df
- Unconditionalize python3 build
42fd1df
5fb19c2
* Wed Sep 14 2016 Ville Skyttä <ville.skytta@iki.fi> - 1.3.0-2
5fb19c2
- Add standard versioned names for executables and man pages (#1374381)
5fb19c2
161a3d6
* Fri Sep  2 2016 Ville Skyttä <ville.skytta@iki.fi> - 1.3.0-1
161a3d6
- Update to 1.3.0
161a3d6
39ffa67
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-2
39ffa67
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
39ffa67
357da2b
* Fri May 13 2016 Ville Skyttä <ville.skytta@iki.fi> - 1.2.3-1
357da2b
- Update to 1.2.3
357da2b
- Build python3 on EL7
357da2b
06b5eea
* Sat May  7 2016 Ville Skyttä <ville.skytta@iki.fi> - 1.2.2-1
06b5eea
- Update to 1.2.2
06b5eea
00d8006
* Fri May  6 2016 Ville Skyttä <ville.skytta@iki.fi> - 1.2.1-1
00d8006
- Update to 1.2.1
00d8006
297b543
* Wed May  4 2016 Ville Skyttä <ville.skytta@iki.fi> - 1.2.0-1
297b543
- Update to 1.2.0
297b543
e6bec88
* Tue Mar  1 2016 Ville Skyttä <ville.skytta@iki.fi> - 1.1.0-1
e6bec88
- Update to 1.1.0
e6bec88
620fe61
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-3
620fe61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
620fe61
bf1cff6
* Wed Nov  4 2015 Ville Skyttä <ville.skytta@iki.fi> - 1.0.0-2
bf1cff6
- Rebuild
bf1cff6
68bb628
* Mon Sep 21 2015 Ville Skyttä <ville.skytta@iki.fi> - 1.0.0-1
68bb628
- Update to 1.0.0
68bb628
- Specfile cleanups per current guidelines
68bb628
a818b76
* Wed Jun 17 2015 Ville Skyttä <ville.skytta@iki.fi> - 0.9.2-1
a818b76
- Update to 0.9.2
a818b76
937a0a0
* Wed Jun 10 2015 Ville Skyttä <ville.skytta@iki.fi> - 0.9.1-1
937a0a0
- Update to 0.9.1
937a0a0
f733b1d
* Mon Jun  1 2015 Ville Skyttä <ville.skytta@iki.fi> - 0.9.0-1
f733b1d
- Update to 0.9.0
f733b1d
- Specfile cleanup and guidelines update
f733b1d
- Improve python3-pyflakes manpage
f733b1d
019d8d2
* Sat Jan 31 2015 Ville Skyttä <ville.skytta@iki.fi> - 0.8.1-4
019d8d2
- Ship LICENSE as %%license where available
019d8d2
- Don't try to build with python3 on EL7 by default
019d8d2
3c15404
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-3
3c15404
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
3c15404
fe0a862
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.8.1-2
fe0a862
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
fe0a862
d7478b0
* Mon Mar 31 2014 Ville Skyttä <ville.skytta@iki.fi> - 0.8.1-1
d7478b0
- Update to 0.8.1
d7478b0
3e9e119
* Wed Mar 26 2014 Ville Skyttä <ville.skytta@iki.fi> - 0.8-1
3e9e119
- Update to 0.8
3e9e119
f89af43
* Wed Dec 11 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.7.3-4
f89af43
- Avoid interfering with pies in version check (#1039706, Timothy Crosley).
f89af43
- Refresh Debian additions tarball.
f89af43
2cf98b5
* Mon Sep  9 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.7.3-3
2cf98b5
- Build Python 3 version (#1004668).
2cf98b5
- Add dependency on setuptools.
2cf98b5
- Update summary and description.
2cf98b5
4aeb8e6
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.3-2
4aeb8e6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4aeb8e6
be6e6a3
* Sun Jul  7 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.7.3-1
be6e6a3
- Update to 0.7.3.
be6e6a3
0195789
* Mon Apr 29 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.7.2-1
0195789
- Update to 0.7.2.
0195789
d58cc9b
* Tue Apr 23 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.7.1-1
d58cc9b
- Update to 0.7.1.
d58cc9b
900cb74
* Thu Apr 18 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.7-1
900cb74
- Update to 0.7.
900cb74
905b539
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-2
905b539
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
905b539
f8d6358
* Tue Feb  5 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.6.1-1
f8d6358
- Update to 0.6.1.
f8d6358
086357d
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-4
086357d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
086357d
046ddfb
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-3
046ddfb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
046ddfb
d688751
* Mon Sep  5 2011 Ville Skyttä <ville.skytta@iki.fi> - 0.5.0-2
d688751
- Bring back null byte input traceback patch.
d688751
- Include LICENSE and NEWS.txt in docs.
d688751
a2b6dbb
* Sun Sep  4 2011 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.5.0-1
a2b6dbb
- Update to 0.5.0
a2b6dbb
- Remove patches that no longer apply
a2b6dbb
a403994
* Mon Apr  4 2011 Ville Skyttä <ville.skytta@iki.fi> - 0.4.0-5
a403994
- Avoid traceback on input with null bytes (#691164).
a403994
06b3afa
* Sun Feb 13 2011 Ville Skyttä <ville.skytta@iki.fi> - 0.4.0-4
06b3afa
- Backport upstream changes for set and dict comprehension support (#677032).
06b3afa
- Add man page and file descriptor close patch from Debian.
06b3afa
b8dbdc7
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-3
b8dbdc7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b8dbdc7
4c7eaa4
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.4.0-2
4c7eaa4
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
4c7eaa4
8997c74
* Fri Mar 19 2010 Ville Skyttä <ville.skytta@iki.fi> - 0.4.0-1
8997c74
- Update to 0.4.0.
8997c74
91df426
* Wed Nov  4 2009 Ville Skyttä <ville.skytta@iki.fi> - 0.3.0-1
91df426
- Update to 0.3.0 (#533015).
91df426
3ae81d3
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-6
3ae81d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
3ae81d3
5de2dcb
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-5
5de2dcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
5de2dcb
31dfb6e
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.2.1-4
31dfb6e
- Rebuild for Python 2.6
31dfb6e
a242d84
* Sat Dec  9 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.2.1-3
a242d84
- Correctly identify the license
a242d84
a242d84
* Sat Dec  9 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.2.1-2
a242d84
- Revert to released tarball
a242d84
a242d84
* Fri Dec  8 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.2.1-1.10526svn
a242d84
- Fix version number
a242d84
a242d84
* Fri Dec  8 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.0-1.10526svn
a242d84
- Fix up versioning
a242d84
a242d84
* Tue Dec  5 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.0-0.1.10526
a242d84
- First version for Fedora Extras