51d6897
%if 0%{?fedora} > 12
1f12936
%global with_python3 1
51d6897
%else
51d6897
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
51d6897
%endif
de86cff
53c567a
# This needs to be pulled from the source tarball
45da38d
%global commit b8ff6bf98468
53c567a
53c567a
de86cff
Name:           pylint
45da38d
Version:        1.4.3
7e66c98
Release:        2%{?dist}
de86cff
Summary:        Analyzes Python code looking for bugs and signs of poor quality
de86cff
Group:          Development/Debuggers
006ee69
License:        GPLv2+
53c567a
URL:            http://www.pylint.org/
9f1cd7e
Source0:        https://bitbucket.org/logilab/pylint/get/pylint-%{version}.tar.bz2
de86cff
922e9df
BuildArch:      noarch
1f12936
BuildRequires:  python-devel python-setuptools python-tools
de75f9d
BuildRequires:  python-six
45da38d
BuildRequires:  python-astroid >= 1.3.6
45da38d
Requires:       python-astroid >= 1.3.6
51d6897
Requires:       python-setuptools
7e66c98
Requires:       python-six
75f7bfd
de86cff
%description
51d6897
Pylint is a python tool that checks if a module satisfy a coding standard.
51d6897
Pylint can be seen as another PyChecker since nearly all tests you can do
51d6897
with PyChecker can also be done with Pylint. But Pylint offers some more
51d6897
features, like checking line-code's length, checking if variable names are
51d6897
well-formed according to your coding standard, or checking if declared
51d6897
interfaces are truly implemented, and much more. The big advantage with
51d6897
Pylint is that it is highly configurable, customizable, and you can easily
de86cff
write a small plugin to add a personal feature.
de86cff
51d6897
%if 0%{?with_python3}
51d6897
%package -n python3-pylint
51d6897
Summary:        Analyzes Python code looking for bugs and signs of poor quality
51d6897
Group:          Development/Debuggers
7e66c98
BuildRequires:  python3-devel python3-setuptools python3-tools
7e66c98
BuildRequires:  python3-six
7e66c98
BuildRequires:  python3-astroid >= 1.3.6
45da38d
Requires:       python3-astroid >= 1.3.6
51d6897
Requires:       python3-setuptools
7e66c98
Requires:       python3-six
51d6897
51d6897
%description -n python3-pylint
51d6897
Pylint is a python tool that checks if a module satisfy a coding standard.
51d6897
Pylint can be seen as another PyChecker since nearly all tests you can do
51d6897
with PyChecker can also be done with Pylint. But Pylint offers some more
51d6897
features, like checking line-code's length, checking if variable names are
51d6897
well-formed according to your coding standard, or checking if declared
51d6897
interfaces are truly implemented, and much more. The big advantage with
51d6897
Pylint is that it is highly configurable, customizable, and you can easily
51d6897
write a small plugin to add a personal feature.
51d6897
%endif # with_python3
de86cff
de86cff
%package gui
de86cff
Summary:        Graphical Interface tool for Pylint
de86cff
Group:          Development/Debuggers
de86cff
Requires:       %{name} = %{version}-%{release}
de86cff
Requires:       tkinter
de86cff
de86cff
%description gui
de86cff
This package provides a gui tool for pylint written in tkinter.
de86cff
51d6897
%if 0%{?with_python3}
51d6897
%package -n python3-pylint-gui
51d6897
Summary:        Graphical Interface tool for Pylint
51d6897
Group:          Development/Debuggers
51d6897
Requires:       python3-pylint = %{version}-%{release}
002e816
Requires:       python3-tkinter
51d6897
51d6897
%description -n python3-pylint-gui
51d6897
This package provides a gui tool for pylint written in tkinter.
51d6897
%endif # with_python3
de86cff
de86cff
%prep
53c567a
%setup -q -n logilab-pylint-%{commit}
de86cff
51d6897
%if 0%{?with_python3}
51d6897
rm -rf %{py3dir}
51d6897
cp -a . %{py3dir}
51d6897
%endif # with_python3
51d6897
de86cff
%build
de86cff
%{__python} setup.py build
de86cff
51d6897
%if 0%{?with_python3}
51d6897
pushd %{py3dir}
51d6897
%{__python3} setup.py build
51d6897
popd
51d6897
%endif # with_python3
de86cff
de86cff
%install
51d6897
%if 0%{?with_python3}
51d6897
pushd %{py3dir}
51d6897
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
51d6897
rm -rf %{buildroot}%{python3_sitelib}/pylint/test
51d6897
mkdir -pm 755 %{buildroot}%{_mandir}/man1
51d6897
install -pm 644 man/*.1 %{buildroot}%{_mandir}/man1/
51d6897
# Add python3- to the binaries
51d6897
for FILE in %{buildroot}%{_bindir}/*; do
51d6897
    NAME=$(basename $FILE)
51d6897
    mv $FILE %{buildroot}%{_bindir}/python3-$NAME
51d6897
done
51d6897
# Add python3- to the manpages
51d6897
for FILE in %{buildroot}%{_mandir}/man1/*; do
51d6897
    NAME=$(basename $FILE)
51d6897
    mv $FILE %{buildroot}%{_mandir}/man1/python3-$NAME
51d6897
done
51d6897
popd
51d6897
%endif # with_python3
51d6897
51d6897
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
51d6897
rm -rf %{buildroot}%{python_sitelib}/pylint/test
51d6897
mkdir -pm 755 %{buildroot}%{_mandir}/man1
51d6897
install -pm 644 man/*.1 %{buildroot}%{_mandir}/man1/
de86cff
a3d3418
%check
a3d3418
%{__python} setup.py test
3ee3cef
51d6897
%if 0%{?with_python3}
51d6897
pushd %{py3dir}
51d6897
%{__python3} setup.py test
51d6897
popd
51d6897
%endif # with_python3
51d6897
de86cff
%files
de86cff
%defattr(-,root,root,-)
53c567a
%doc README ChangeLog examples elisp COPYING
51d6897
%{python_sitelib}/pylint*
cd97744
%{_bindir}/*
097752d
%{_mandir}/man?/*
51d6897
%exclude %{python_sitelib}/pylint/gui.py*
cd97744
%exclude %{_bindir}/pylint-gui
f58ab25
%exclude %{_bindir}/python3-*
f58ab25
%exclude %{_mandir}/man?/python3-*
de86cff
de86cff
%files gui
de86cff
%defattr(-,root,root,-)
a3d2799
%doc COPYING
51d6897
%{python_sitelib}/pylint/gui.py*
de86cff
%{_bindir}/pylint-gui
de86cff
51d6897
%if 0%{?with_python3}
51d6897
%files -n python3-pylint
51d6897
%defattr(-,root,root,-)
1f12936
%doc README ChangeLog examples elisp COPYING
51d6897
%{python3_sitelib}/pylint*
51d6897
%{_bindir}/python3-*
51d6897
%{_mandir}/man?/python3-*
51d6897
%exclude %{python3_sitelib}/pylint/gui.py*
51d6897
%exclude %{_bindir}/python3-pylint-gui
51d6897
51d6897
%files -n python3-pylint-gui
51d6897
%defattr(-,root,root,-)
51d6897
%doc COPYING
51d6897
%{python3_sitelib}/pylint/gui.py*
51d6897
%{_bindir}/python3-pylint-gui
51d6897
%endif # with_python3
de86cff
de86cff
%changelog
7e66c98
* Wed May 27 2015 Mathieu Bridon <bochecha@daitauha.fr> - 1.4.3-2
7e66c98
- Drop python3 requirements from the python2 package.
7e66c98
- Add missing requirement on six.
7e66c98
45da38d
* Tue Apr 28 2015 Brian C. Lane <bcl@redhat.com> 1.4.3-1
45da38d
- Upstream v1.4.3
45da38d
f58ab25
* Fri Jan 30 2015 Brian C. Lane <bcl@redhat.com> 1.4.1-3
f58ab25
- Exclude the python3-* files from the python2 package
f58ab25
de75f9d
* Thu Jan 29 2015 Brian C. Lane <bcl@redhat.com> 1.4.1-2
de75f9d
- Add python-six requirement
de75f9d
3e455aa
* Wed Jan 28 2015 Brian C. Lane <bcl@redhat.com> 1.4.1-1
3e455aa
- Upstream v1.4.1
3e455aa
002e816
* Mon Oct 27 2014 Brian C. Lane <bcl@redhat.com> 1.3.1-2
002e816
- python3-pylint-gui needs python3-tkinter
002e816
633aeea
* Fri Oct 03 2014 Brian C. Lane <bcl@redhat.com> 1.3.1-1
633aeea
- Upstream v1.3.1
633aeea
  Dropped patches included in upstream
633aeea
cd28325
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-7
cd28325
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
cd28325
b234779
* Mon Jun 02 2014 Brian C. Lane <bcl@redhat.com> 1.2-6
b234779
- Add python3-astroid and python3-setuptools as Requires (#1103479)
b234779
444a32e
* Tue May 27 2014 Kalev Lember <kalevlember@gmail.com> - 1.2-5
444a32e
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
444a32e
72897ea
* Fri May 09 2014 Brian C. Lane <bcl@redhat.com> 1.2-4
72897ea
- Fix a potential AttributeError when checking for `reversed` arguments.
72897ea
  https://bitbucket.org/logilab/pylint/commits/93babaf6bffc59a49c75319d9850086b4935edbc
72897ea
a13bbd4
* Thu May 08 2014 Brian C. Lane <bcl@redhat.com> 1.2-3
a13bbd4
- fix explicit check of python script
a13bbd4
  https://bitbucket.org/logilab/pylint/issue/219/
a13bbd4
922e9df
* Thu Apr 24 2014 Brian C. Lane <bcl@redhat.com> 1.2-2
922e9df
- Patch to Fix --init-hook typo (dshea)
922e9df
  https://bitbucket.org/logilab/pylint/issue/211/init-hook-no-longer-works
922e9df
9f1cd7e
* Tue Apr 22 2014 Brian C. Lane <bcl@redhat.com> 1.2-1
9f1cd7e
- Upstream v1.2
9f1cd7e
4b79379
* Thu Feb 27 2014 Brian C. Lane <bcl@redhat.com> 1.1.0-1
4b79379
- Upstream v1.1.0
4b79379
  Drop patch included in upstream
4b79379
1f12936
* Thu Oct 24 2013 Brian C. Lane <bcl@redhat.com> 1.0.0-3
1f12936
- Switching on python3 support
1f12936
501af29
* Tue Sep 03 2013 Brian C. Lane <bcl@redhat.com> 1.0.0-2
501af29
- Add upstream patch for epylint input validation (#981859)
501af29
53c567a
* Tue Aug 13 2013 Brian C. Lane <bcl@redhat.com> 1.0.0-1
53c567a
- Upstream 1.0.0
53c567a
9decff7
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.26.0-3
9decff7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
9decff7
77677f3
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.26.0-2
77677f3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
77677f3
51d6897
* Thu Jan 10 2013 Brian C. Lane <bcl@redhat.com> 0.26.0-1
51d6897
- Upstream 0.26.0
51d6897
- Add python3-pylint and python3-pylint-gui subpackages. Not ready to turn it
51d6897
  on yet due to this upstream bug: http://www.logilab.org/ticket/110213
51d6897
e4b7c9a
* Fri Aug 03 2012 Brian C. Lane <bcl@redhat.com> 0.25.2-1
e4b7c9a
- Upstream 0.25.2
e4b7c9a
319bf74
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.25.1-2
319bf74
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
319bf74
e0640e5
* Wed Mar 14 2012 Brian C. Lane <bcl@redhat.com> 0.25.1-1
e0640e5
- Upstream 0.25.1
e0640e5
3b8776d
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.25.0-2
3b8776d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
3b8776d
fb08bcb
* Fri Nov 18 2011 Brian C. Lane <bcl@redhat.com> - 0.25.0-1
fb08bcb
- Upstream 0.25.0
fb08bcb
d48dff6
* Fri Jul 29 2011 Brian C. Lane <bcl@redhat.com> - 0.24.0-1
d48dff6
- Upstream 0.24.0
d48dff6
a3d3418
* Mon Mar 28 2011 Brian C. Lane <bcl@redhat.com> - 0.23-0.1
a3d3418
- Upstream 0.23.0
a3d3418
- Add unit tests to spec
a3d3418
a738fc5
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22.0-3
a738fc5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a738fc5
6087c5a
* Mon Dec 06 2010 Brian C. Lane <bcl@redhat.com> - 0.22.0-2
6087c5a
- Add version to requirement for python-logilab-astng so that updates will
6087c5a
  work correctly.
6087c5a
6087c5a
* Mon Nov 29 2010 Brian C. Lane <bcl@redhat.com> - 0.22.0-1
ca54d9c
- Upstream 0.22.0
ca54d9c
ec90ee7
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.21.1-2
ec90ee7
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
ec90ee7
80e557d
* Thu Jul 08 2010 Brian C. Lane <bcl@redhat.com> - 0.21.1-1
80e557d
- Upstream 0.21.1
80e557d
- Removed patch for 500272, fixed upstream - http://www.logilab.org/ticket/22962
80e557d
75f7bfd
* Mon Apr 05 2010 Brian C. Lane <bcl@redhat.com> - 0.20.0-2
75f7bfd
- Added patch for bug 500272 (exception with --disable-msg-cat)
75f7bfd
7a1fe13
* Fri Mar 26 2010 Brian C.Lane <bcl@redhat.com> - 0.20.0-1
7a1fe13
- Upstream 0.20.0
7a1fe13
- Added python-setuptools to BuildRequires
bf9494e
94244e9
* Sun Aug 30 2009 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.18.1-1
94244e9
- Upstream 0.18.1 (bugfixes and small enhancements)
94244e9
57d9808
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.18.0-2
57d9808
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
57d9808
e8c832e
* Wed Jun 17 2009 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.18.0-1
e8c832e
- Upstream 0.18.0 (bugfixes and minor feature updates)
e8c832e
8c96057
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16.0-2
8c96057
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
8c96057
05eae2c
* Wed Jan 28 2009 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.16.0-1
05eae2c
- Upstream 0.16.0
05eae2c
318e2e1
* Tue Dec 30 2008 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.15.2-1
318e2e1
- Upstream 0.15.2
318e2e1
5877b6b
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.14.0-2
5877b6b
- Rebuild for Python 2.6
5877b6b
fe33666
* Thu Jan 17 2008 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.14.0-1
fe33666
- Upstream 0.14.0
fe33666
- Package the .egg-info files.
fe33666
006ee69
* Mon Dec 24 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.13.2-1
006ee69
- Upstream 0.13.2
006ee69
- Adjust license to a more precise version
006ee69
- Fix docs to be valid utf-8
006ee69
86c4bda
* Sun Apr 01 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.13.1-1
86c4bda
- Upstream 0.13.1
86c4bda
a3d2799
* Sun Dec 17 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.12.2-1
a3d2799
- Upstream 0.12.2
a3d2799
- Add COPYING to -gui
a3d2799
cd97744
* Tue Sep 26 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.12.1-1
a3d2799
- Upstream 0.12.1
cd97744
- Require the renamed python-logilab-astng
cd97744
ee0662a
* Mon May 01 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.11.0-0
ee0662a
- Version 0.11.0
ee0662a
fb33f0c
* Sun Mar 12 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.10.0-1
fb33f0c
- Version 0.10.0
fb33f0c
8180db7
* Thu Jan 12 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.0-1
8180db7
- Version 0.9.0
8180db7
- Add COPYING to docs
8180db7
29ae062
* Sun Nov 13 2005 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.8.1-1
29ae062
- Version 0.8.1
29ae062
- Add dependency on python-astng
29ae062
- Drop artificial version requirement on python-logilab-common
29ae062
3ee3cef
* Mon Jun 13 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 0.7.0-1
3ee3cef
- Version 0.7.0
3ee3cef
- No longer in the logilab subdir
3ee3cef
- Disttagging
3ee3cef
097752d
* Mon May 09 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 0.6.4-4
097752d
- Install the pylint.1 manfile.
097752d
- Add examples and elisp dirs to docs.
097752d
de86cff
* Thu May 05 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 0.6.4-3
de86cff
- Only doc the .txt files.
de86cff
- Don't buildrequire python-logilab-common
de86cff
- Fix paths.
de86cff
de86cff
* Tue Apr 26 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 0.6.4-2
de86cff
- Ghost .pyo files.
de86cff
- Remove the test dir, as it doesn't do anything.
de86cff
- Separate the gui package, which depends on tkinter.
de86cff
- Don't own site-packages/logilab, which is owned by
de86cff
  python-logilab-common.
de86cff
de86cff
* Fri Apr 22 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 0.6.4-1
de86cff
- Initial packaging.