[packages/pylint] - updated to 2.4.4 - package binaries with -3 suffix (as commonly packaged by others) in py3lint pac

qboosh qboosh at pld-linux.org
Sat Nov 16 18:11:05 CET 2019


commit b50e5110be05f78d1426a062df8e3f6b581f0556
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Nov 16 18:11:19 2019 +0100

    - updated to 2.4.4
    - package binaries with -3 suffix (as commonly packaged by others) in py3lint package
    - base pylint package is a wrapper for py3lint with standard binary names

 pylint.spec | 112 +++++++++++++++++-------------------------------------------
 1 file changed, 32 insertions(+), 80 deletions(-)
---
diff --git a/pylint.spec b/pylint.spec
index 5bbe435..8f02df7 100644
--- a/pylint.spec
+++ b/pylint.spec
@@ -1,35 +1,19 @@
-# TODO:
-# - include examples in package
-
+#
 # Conditional build:
-%bcond_with	python2	# Python 2.x version
-%bcond_without	python3	# Python 3.x version (available as 'py3lint')
-%bcond_without	doc	# Documentation
+%bcond_without	doc	# Sphinx documentation
 %bcond_with	tests	# unit tests
 
-Summary:	Python 2 tool that checks if a module satisfy a coding standard
-Summary(pl.UTF-8):	Narzędzie Pythona 2 sprawdzające zgodność modułu ze standardem kodowania
+Summary:	Python tool that checks if a module satisfy a coding standard
+Summary(pl.UTF-8):	Narzędzie Pythona sprawdzające zgodność modułu ze standardem kodowania
 Name:		pylint
-Version:	2.4.3
-Release:	3
+Version:	2.4.4
+Release:	1
 License:	GPL v2+
 Group:		Development/Languages/Python
 #Source0Download: https://pypi.org/simple/pylint/
 Source0:	https://github.com/PyCQA/pylint/archive/%{name}-%{version}.tar.gz
-# Source0-md5:	742ac2d6e2528e0d2f52edadd31c837b
+# Source0-md5:	21edaf9a0e5d836a23731f81c6bc48c2
 URL:		http://www.pylint.org/
-%if %{with python2}
-BuildRequires:	python-astroid >= 2.3.0
-BuildRequires:	python-devel >= 1:3.5
-BuildRequires:	python-mccabe
-BuildRequires:	python-modules >= 1:3.5
-BuildRequires:	python-setuptools >= 7.0
-%if %{with tests}
-BuildRequires:	python-isort >= 4.2.5
-BuildRequires:	python-mccabe >= 0.6
-%endif
-%endif
-%if %{with python3}
 BuildRequires:	python3-astroid >= 1.5.3
 BuildRequires:	python3-devel >= 1:3.5
 BuildRequires:	python3-mccabe
@@ -39,43 +23,22 @@ BuildRequires:	python3-setuptools >= 7.0
 BuildRequires:	python3-isort >= 4.2.5
 BuildRequires:	python3-mccabe >= 0.6
 %endif
-%endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 %if %{with doc}
 BuildRequires:	sphinx-pdg
 %endif
-Requires:	python-pylint = %{version}-%{release}
-Suggests:	python-devel-src
+Requires:	py3lint = %{version}-%{release}
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-# /etc/pylintrc is deliberately packaged to both packages with same name
-%define		_duplicate_files_terminate_build	0
-
 %description
-Python 2 tool that checks if a module satisfy a coding standard.
+Python tool that checks if a module satisfy a coding standard.
 
 %description -l pl.UTF-8
-Narzędzie Pythona 2 sprawdzające zgodność modułów napisanych w języku
-Python z regułami tworzenia kodu źródłowego.
-
-%package -n python-pylint
-Summary:	Python 2 tool that checks if a module satisfy a coding standard (modules)
-Summary(pl.UTF-8):	Narzędzie Pythona sprawdzające zgodność modułu ze standardem kodowania (moduły)
-Group:		Libraries/Python
-
-%description -n python-pylint
-Python 2 tool that checks if a module satisfy a coding standard.
-
-This package contains only the Python modules used by the tool.
-
-%description -n python-pylint -l pl.UTF-8
-Narzędzie Pythona 2 sprawdzające zgodność modułów napisanych w języku
+Narzędzie Pythona sprawdzające zgodność modułów napisanych w języku
 Python z regułami tworzenia kodu źródłowego.
 
-Ten pakiet zawiera tylko moduły Pythona używane przez to narzędzie.
-
 %package -n py3lint
 Summary:	Python 3 tool that checks if a module satisfy a coding standard
 Summary(pl.UTF-8):	Narzędzie Pythona 3 sprawdzające zgodność modułu ze standardem kodowania
@@ -125,13 +88,7 @@ Dokumentacja do pylinta.
 %setup -q -n pylint-pylint-%{version}
 
 %build
-%if %{with python2}
-%py_build
-%endif
-
-%if %{with python3}
 %py3_build
-%endif
 
 %if %{with doc}
 %{__make} -C doc text \
@@ -142,66 +99,61 @@ Dokumentacja do pylinta.
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1}
 
-%if %{with python3}
 %py3_install
 
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/epylint $RPM_BUILD_ROOT%{_bindir}/epy3lint
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/pylint $RPM_BUILD_ROOT%{_bindir}/py3lint
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/pyreverse $RPM_BUILD_ROOT%{_bindir}/py3reverse
-cp -p man/epylint.1 $RPM_BUILD_ROOT%{_mandir}/man1/epy3lint.1
-cp -p man/pylint.1 $RPM_BUILD_ROOT%{_mandir}/man1/py3lint.1
-cp -p man/pyreverse.1 $RPM_BUILD_ROOT%{_mandir}/man1/py3reverse.1
-%endif
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
-%endif
+for tool in epylint pylint pyreverse symilar ; do
+	%{__mv} $RPM_BUILD_ROOT%{_bindir}/${tool} $RPM_BUILD_ROOT%{_bindir}/${tool}-3
+	ln -s ${tool}-3 $RPM_BUILD_ROOT%{_bindir}/${tool}
+	cp -p man/${tool}.1 $RPM_BUILD_ROOT%{_mandir}/man1/${tool}-3.1
+	echo ".so ${tool}-3.1" >$RPM_BUILD_ROOT%{_mandir}/man1/${tool}.1
+done
+# old PLD package compatibility
+ln -s epylint-3 $RPM_BUILD_ROOT%{_bindir}/epy3lint
+ln -s pylint-3 $RPM_BUILD_ROOT%{_bindir}/py3lint
+ln -s pyreverse-3 $RPM_BUILD_ROOT%{_bindir}/py3reverse
+echo '.so epylint-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/epy3lint.1
+echo '.so pylint-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/py3lint.1
+echo '.so pyreverse-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/py3reverse.1
 
 cp -p examples/pylintrc $RPM_BUILD_ROOT%{_sysconfdir}/pylintrc
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/epylint
 %attr(755,root,root) %{_bindir}/pylint
 %attr(755,root,root) %{_bindir}/pyreverse
 %attr(755,root,root) %{_bindir}/symilar
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc
 %{_mandir}/man1/epylint.1*
 %{_mandir}/man1/pylint.1*
 %{_mandir}/man1/pyreverse.1*
 %{_mandir}/man1/symilar.1*
 
-%files -n python-pylint
-%defattr(644,root,root,755)
-%doc CONTRIBUTORS.txt ChangeLog README.rst examples/*
-%{py_sitescriptdir}/pylint
-%{py_sitescriptdir}/pylint-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
 %files -n py3lint
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/epylint-3
+%attr(755,root,root) %{_bindir}/pylint-3
+%attr(755,root,root) %{_bindir}/pyreverse-3
+%attr(755,root,root) %{_bindir}/symilar-3
 %attr(755,root,root) %{_bindir}/epy3lint
 %attr(755,root,root) %{_bindir}/py3lint
 %attr(755,root,root) %{_bindir}/py3reverse
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc
+%{_mandir}/man1/epylint-3.1*
+%{_mandir}/man1/pylint-3.1*
+%{_mandir}/man1/pyreverse-3.1*
+%{_mandir}/man1/symilar-3.1*
 %{_mandir}/man1/epy3lint.1*
 %{_mandir}/man1/py3lint.1*
 %{_mandir}/man1/py3reverse.1*
 
 %files -n python3-pylint
 %defattr(644,root,root,755)
-%doc CONTRIBUTORS.txt ChangeLog README.rst examples/*
+%doc CONTRIBUTORS.txt ChangeLog README.rst examples
 %{py3_sitescriptdir}/pylint
 %{py3_sitescriptdir}/pylint-%{version}-py*.egg-info
-%endif
 
 %if %{with doc}
 %files doc
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pylint.git/commitdiff/b50e5110be05f78d1426a062df8e3f6b581f0556



More information about the pld-cvs-commit mailing list