Blob Blame History Raw
%if 0%{?fedora} || 0%{?rhel} >= 7
%bcond_without python3
%else
%bcond_with python3
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif

Name:           pyflakes
Version:        0.8.1
Release:        1%{?dist}
Summary:        A simple program which checks Python source files for errors

Group:          Development/Languages
License:        MIT
URL:            https://launchpad.net/pyflakes

Source0:        http://pypi.python.org/packages/source/p/pyflakes/pyflakes-%{version}.tar.gz
Source1:        http://cdn.debian.net/debian/pool/main/p/pyflakes/pyflakes_0.7.3-1.debian.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python-setuptools
Requires:       python-setuptools

%global desc Pyflakes is similar to PyChecker in scope, but differs in that it does\
not execute the modules to check them. This is both safer and faster,\
although it does not perform as many checks. Unlike PyLint, Pyflakes\
checks only for logical errors in programs; it does not perform any\
check on style.

%description
%{desc}

%if %{with python3}
%package -n python3-%{name}
Summary:        %{summary}
Group:          %{group}
# -devel for the python3 macros
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
Requires:       python3-setuptools

%description -n python3-%{name}
%{desc}
%endif

%prep
%setup -q -a 1
%if %{with python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif

%build
%{__python} setup.py build
%if %{with python3}
cd %{py3dir}
%{__python3} setup.py build
cd -
%endif

%install
rm -rf %{buildroot}
install -Dpm 644 debian/pyflakes.1 %{buildroot}%{_mandir}/man1/pyflakes.1
%if %{with python3}
cd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
mv %{buildroot}%{_bindir}/pyflakes %{buildroot}%{_bindir}/python3-pyflakes
cd - ; cd %{buildroot}%{_mandir}/man1
echo ".so man1/pyflakes.1" > python3-pyflakes.1
touch -r pyflakes.1 python3-pyflakes.1
cd -
%endif
%{__python} setup.py install -O1 --skip-build --root %{buildroot}

%check
%{__python} setup.py test
%if %{with python3}
cd %{py3dir}
%{__python3} setup.py test
cd -
%endif

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc AUTHORS LICENSE NEWS.txt PKG-INFO README.rst
%{_bindir}/pyflakes
%{python_sitelib}/pyflakes*
%exclude %{python_sitelib}/pyflakes/test/
%{_mandir}/man1/pyflakes.1*

%if %{with python3}
%files -n python3-%{name}
%defattr(-,root,root,-)
%doc AUTHORS LICENSE NEWS.txt PKG-INFO README.rst
%{_bindir}/python3-pyflakes
%{python3_sitelib}/pyflakes*
%exclude %{python3_sitelib}/pyflakes/test/
%{_mandir}/man1/pyflakes.1*
%{_mandir}/man1/python3-pyflakes.1*
%endif

%changelog
* Mon Mar 31 2014 Ville Skyttä <ville.skytta@iki.fi> - 0.8.1-1
- Update to 0.8.1

* Wed Mar 26 2014 Ville Skyttä <ville.skytta@iki.fi> - 0.8-1
- Update to 0.8

* Wed Dec 11 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.7.3-4
- Avoid interfering with pies in version check (#1039706, Timothy Crosley).
- Refresh Debian additions tarball.

* Mon Sep  9 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.7.3-3
- Build Python 3 version (#1004668).
- Add dependency on setuptools.
- Update summary and description.

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sun Jul  7 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.7.3-1
- Update to 0.7.3.

* Mon Apr 29 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.7.2-1
- Update to 0.7.2.

* Tue Apr 23 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.7.1-1
- Update to 0.7.1.

* Thu Apr 18 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.7-1
- Update to 0.7.

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Tue Feb  5 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.6.1-1
- Update to 0.6.1.

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Sep  5 2011 Ville Skyttä <ville.skytta@iki.fi> - 0.5.0-2
- Bring back null byte input traceback patch.
- Include LICENSE and NEWS.txt in docs.

* Sun Sep  4 2011 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.5.0-1
- Update to 0.5.0
- Remove patches that no longer apply

* Mon Apr  4 2011 Ville Skyttä <ville.skytta@iki.fi> - 0.4.0-5
- Avoid traceback on input with null bytes (#691164).

* Sun Feb 13 2011 Ville Skyttä <ville.skytta@iki.fi> - 0.4.0-4
- Backport upstream changes for set and dict comprehension support (#677032).
- Add man page and file descriptor close patch from Debian.

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Fri Mar 19 2010 Ville Skyttä <ville.skytta@iki.fi> - 0.4.0-1
- Update to 0.4.0.

* Wed Nov  4 2009 Ville Skyttä <ville.skytta@iki.fi> - 0.3.0-1
- Update to 0.3.0 (#533015).

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.2.1-4
- Rebuild for Python 2.6

* Sat Dec  9 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.2.1-3
- Correctly identify the license

* Sat Dec  9 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.2.1-2
- Revert to released tarball

* Fri Dec  8 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.2.1-1.10526svn
- Fix version number

* Fri Dec  8 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.0-1.10526svn
- Fix up versioning

* Tue Dec  5 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.0-0.1.10526
- First version for Fedora Extras