14
0
forked from pool/python-pylint

Accepting request 479733 from devel:languages:python:singlespec

- update for singlespec
- enable test suite for all pythons
- update to 1.7.0 git pre-release, for python 3.6 support
  (boo#1026174)
  * multitude of new checkers
  * support for namespace packages
  * dropped pylint-gui
  * see changes in /usr/share/doc/packages/python-pylint/ChangeLog

OBS-URL: https://build.opensuse.org/request/show/479733
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylint?expand=0&rev=71
This commit is contained in:
Jan Matejek
2017-03-15 15:33:32 +00:00
committed by Git OBS Bridge
parent a5ec8efde5
commit 6ec4034e6d
5 changed files with 84 additions and 54 deletions

17
_service Normal file
View File

@@ -0,0 +1,17 @@
<services>
<service name="tar_scm" mode="localonly">
<param name="scm">git</param>
<param name="url">https://github.com/pycqa/pylint.git</param>
<param name="filename">pylint</param>
<param name="versionprefix">1.7.0~git</param>
<!-- <param name="revision">optional: the commit hash, tag or branch you want to get</param>-->
</service>
<service name="recompress" mode="localonly">
<param name="compression">gz</param>
<param name="file">*.tar</param>
</service>
<service name="set_version" mode="localonly"/>
</services>

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a673984a8dd78e4a8b8cfdee5359a1309d833cf38405008f4a249994a8456719
size 465578

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ae61678d58af6fbe076d25daee66f9a81a04cf33d728d6193409a0de2b0155ee
size 506764

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Wed Mar 1 14:27:35 UTC 2017 - jmatejek@suse.com
- update for singlespec
- enable test suite for all pythons
- update to 1.7.0 git pre-release, for python 3.6 support
(boo#1026174)
* multitude of new checkers
* support for namespace packages
* dropped pylint-gui
* see changes in /usr/share/doc/packages/python-pylint/ChangeLog
-------------------------------------------------------------------
Wed Feb 1 08:19:18 UTC 2017 - michael@stroeder.com

View File

@@ -16,30 +16,50 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pylint
Version: 1.6.5
Version: 1.7.0~git.1489322553.d78e0130
Release: 0
Summary: Syntax and style checker for Python code
License: GPL-2.0+
Group: Development/Languages/Python
Url: https://github.com/pycqa/pylint
Source: https://files.pythonhosted.org/packages/source/p/pylint/pylint-%{version}.tar.gz
BuildRequires: python-astroid
BuildRequires: python-six
BuildRequires: python-tk
BuildRequires: %{python_module astroid}
BuildRequires: %{python_module six}
BuildRequires: python-rpm-macros
# SECTION test requiremenst
BuildRequires: %{python_module editdistance}
BuildRequires: %{python_module isort >= 4.2.5}
BuildRequires: %{python_module mccabe}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest}
BuildRequires: fdupes
BuildRequires: python2-backports.functools_lru_cache
BuildRequires: python2-configparser
BuildRequires: python2-enum34
BuildRequires: python2-singledispatch
# test is checking that "tkinter.tix" is deprecated
BuildRequires: python3-tk
# /SECTION
Requires: python-astroid
Requires: python-editdistance
Requires: python-isort >= 4.2.5
Requires: python-mccabe
Requires: python-six
Requires: python-tk
%ifpython2
Requires: python-backports.functools_lru_cache
Requires: python-configparser
Requires: python-enum34
Requires: python-singledispatch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%ifpython2
Provides: pylint = %{version}
Obsoletes: pylint < %{version}
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%python_subpackages
%description
Pylint analyzes Python source code looking for bugs and signs of poor
@@ -61,56 +81,37 @@ feature.
%setup -q -n pylint-%{version}
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} --no-compile
%python_install
# fix non-executable rpmlint warning
chmod +x %{buildroot}%{python_sitelib}/pylint/epylint.py
# Prepare for update-alternatives usage
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for p in pylint epylint pylint-gui pyreverse symilar ; do
mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver}
ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p
# create a dummy target for /etc/alternatives/$p
touch %{buildroot}%{_sysconfdir}/alternatives/$p
for p in pylint epylint pyreverse symilar ; do
%python_clone -a %{buildroot}%{_bindir}/$p
done
%fdupes %{buildroot}%{_prefix}
%post
%_sbindir/update-alternatives \
--install %{_bindir}/pylint pylint %{_bindir}/pylint-%{py_ver} 30 \
--slave %{_bindir}/epylint epylint %{_bindir}/epylint-%{py_ver} \
--slave %{_bindir}/pylint-gui pylint-gui %{_bindir}/pylint-gui-%{py_ver} \
--slave %{_bindir}/pyreverse pyreverse %{_bindir}/pyreverse-%{py_ver} \
--slave %{_bindir}/symilar symilar %{_bindir}/symilar-%{py_ver}
%python_install_alternative pylint epylint pyreverse symilar
%postun
if [ $1 -eq 0 ] ; then
%_sbindir/update-alternatives --remove pylint %{_bindir}/pylint-%{py_ver}
fi
%preun
%python_uninstall_alternative pylint
%files
%check
export PYTHONPATH=$PWD
%python_exec %{_bindir}/py.test pylint/test/
%files %{python_files}
%defattr(-,root,root)
%doc ChangeLog COPYING README.rst
%doc examples/
%{_bindir}/pylint
%{_bindir}/epylint
%{_bindir}/pylint-gui
%{_bindir}/pyreverse
%{_bindir}/symilar
%{_bindir}/pylint-%{py_ver}
%{_bindir}/epylint-%{py_ver}
%{_bindir}/pylint-gui-%{py_ver}
%{_bindir}/pyreverse-%{py_ver}
%{_bindir}/symilar-%{py_ver}
%ghost %{_sysconfdir}/alternatives/pylint
%ghost %{_sysconfdir}/alternatives/epylint
%ghost %{_sysconfdir}/alternatives/pylint-gui
%ghost %{_sysconfdir}/alternatives/pyreverse
%ghost %{_sysconfdir}/alternatives/symilar
%python_alternative %{_bindir}/pylint
%python_alternative %{_bindir}/epylint
%python_alternative %{_bindir}/pyreverse
%python_alternative %{_bindir}/symilar
%{python_sitelib}/pylint/
%{python_sitelib}/pylint-%{version}-py*.egg-info
#%{python_sitelib}/pylint-%{version}-py*.egg-info
%{python_sitelib}/pylint-1.7.0-py*.egg-info
%changelog