Package: pylint
Version: 1.1.0-1
Followup-For: Bug #606165
I got annoyed with this and decided to try to fix it. Attached patch I
think gets about 90% of the way there.
The big thing that is broken is that the unit tests fail under python3
because they're written for python2 and need 2to3 run across a copy of them
to have any hope. This doesn't stop the package from building, however.
Some of the unit tests are failing under python2, but I don't think that's
the fault of these changes.
Something is slightly haywire with the package build knowing which version
of python is used for which binary package, and so the python2 package
generates these warnings:
dpkg-gencontrol: warning: package pylint: unused substitution variable
${python3:Depends}
dpkg-gencontrol: warning: package pylint: unused substitution variable
${python:Versions}
Not sure how to fix that, or if it even needs fixing?
diff -urN pylint-1.1.0/debian/changelog pylint-1.1.0-py3/debian/changelog
--- pylint-1.1.0/debian/changelog 2014-01-25 17:49:23.000000000 -0500
+++ pylint-1.1.0-py3/debian/changelog 2014-01-25 17:50:20.051156610 -0500
@@ -1,3 +1,10 @@
+pylint (1.1.0-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Add python3 support experimentally
+
+ -- Matthew Gabeler-Lee (Cheetah) <[email protected]> Sat, 25 Jan 2014 17:49:57 -0500
+
pylint (1.1.0-1) unstable; urgency=low
* New upstream release
diff -urN pylint-1.1.0/debian/control pylint-1.1.0-py3/debian/control
--- pylint-1.1.0/debian/control 2014-01-25 17:49:23.000000000 -0500
+++ pylint-1.1.0-py3/debian/control 2014-01-25 18:45:44.147319953 -0500
@@ -3,8 +3,8 @@
Priority: optional
Maintainer: Python Applications Packaging Team <[email protected]>
Uploaders: Sylvain Thénault <[email protected]>, Alexandre Fayolle <[email protected]>, Sandro Tosi <[email protected]>
-Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~)
-Build-Depends-Indep: python-logilab-common (>= 0.53.0), python-astroid, python-unittest2
+Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python3 (>= 3.3.2-17)
+Build-Depends-Indep: python-logilab-common (>= 0.53.0), python3-logilab-common (>= 0.53.0), python-astroid, python3-astroid, python-unittest2
Standards-Version: 3.9.5
XS-Python-Version: >= 2.6
Homepage: http://www.pylint.org/
@@ -19,6 +19,31 @@
Pylint is a Python source code analyzer which looks for programming
errors, helps enforcing a coding standard and sniffs for some code
smells (as defined in Martin Fowler's Refactoring book)
+ .
+ Pylint can be seen as another PyChecker since nearly all tests you
+ can do with PyChecker can also be done with Pylint. However, Pylint
+ offers some more features, like checking length of lines of code,
+ checking if variable names are well-formed according to your coding
+ standard, or checking if declared interfaces are truly implemented,
+ and much more.
+ .
+ Additionally, it is possible to write plugins to add your own checks.
+ .
+ The package also ships the following additional commands:
+ .
+ * pyreverse: an UML diagram generator
+ * symilar: an independent similarities checker
+ * epylint: Emacs and Flymake compatible Pylint
+ * pylint-gui: a graphical interface (reason for python-tk recommends)
+
+Package: pylint3
+Architecture: all
+Depends: ${python3:Depends}, ${misc:Depends}, python3-logilab-common (>= 0.53.0), python3-astroid
+Recommends: python3-tk
+Description: python code static checker and UML diagram generator (python3 version)
+ Pylint is a Python source code analyzer which looks for programming
+ errors, helps enforcing a coding standard and sniffs for some code
+ smells (as defined in Martin Fowler's Refactoring book)
.
Pylint can be seen as another PyChecker since nearly all tests you
can do with PyChecker can also be done with Pylint. However, Pylint
diff -urN pylint-1.1.0/debian/pylint3.docs pylint-1.1.0-py3/debian/pylint3.docs
--- pylint-1.1.0/debian/pylint3.docs 1969-12-31 19:00:00.000000000 -0500
+++ pylint-1.1.0-py3/debian/pylint3.docs 2014-01-25 17:51:18.554738004 -0500
@@ -0,0 +1,2 @@
+#doc/*
+README
diff -urN pylint-1.1.0/debian/pylint3.examples pylint-1.1.0-py3/debian/pylint3.examples
--- pylint-1.1.0/debian/pylint3.examples 1969-12-31 19:00:00.000000000 -0500
+++ pylint-1.1.0-py3/debian/pylint3.examples 2014-01-25 17:51:44.986551571 -0500
@@ -0,0 +1 @@
+examples/*
diff -urN pylint-1.1.0/debian/pylint3.manpages pylint-1.1.0-py3/debian/pylint3.manpages
--- pylint-1.1.0/debian/pylint3.manpages 1969-12-31 19:00:00.000000000 -0500
+++ pylint-1.1.0-py3/debian/pylint3.manpages 2014-01-25 17:51:18.554738004 -0500
@@ -0,0 +1 @@
+man/*.1
diff -urN pylint-1.1.0/debian/rules pylint-1.1.0-py3/debian/rules
--- pylint-1.1.0/debian/rules 2014-01-25 17:49:23.000000000 -0500
+++ pylint-1.1.0-py3/debian/rules 2014-01-25 18:48:18.418266396 -0500
@@ -3,39 +3,71 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-PYVERS := $(shell pyversions -s -v)
+PYVERS2 := $(shell pyversions -s -v)
+PYVERS3 := $(shell py3versions -s -v)
+PYTHON2 := $(shell pyversions -s)
+PYTHON3 := $(shell py3versions -s)
%:
- dh $@ --with python2
+ dh $@ --with python2,python3
override_dh_auto_build:
dh_auto_build
- NO_SETUPTOOLS=1 python setup.py -q build
+ set -e; \
+ for python in $(PYTHON2) $(PYTHON3) ; do \
+ NO_SETUPTOOLS=1 $$python setup.py build ; \
+ done
override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
# use the default python version to select the script dir to run the tests
- -./test/fulltest.sh $(PYVERS)
+ -./test/fulltest.sh $(PYVERS2)
+ -./test/fulltest.sh $(PYVERS3)
endif
+override_dh_auto_clean:
+ NO_SETUPTOOLS=1 python setup.py clean
+ NO_SETUPTOOLS=1 python3 setup.py clean
+
+ find . -name "*.pyc" -delete
+
+ rm -rf build
+ dh_clean
override_dh_auto_install:
NO_SETUPTOOLS=1 python setup.py -q install --no-compile \
--root=$(CURDIR)/debian/pylint \
--install-layout=deb
+ NO_SETUPTOOLS=1 python3 setup.py -q install --no-compile \
+ --root=$(CURDIR)/debian/pylint3 \
+ --install-layout=deb
rm -rf debian/pylint/usr/lib/python*/*-packages/pylint/test
+ rm -rf debian/pylint3/usr/lib/python*/*-packages/pylint/test
# fixes shebangs
- for exec in pylint pylint-gui symilar ; do \
+ for exec in pylint pylint-gui symilar epylint pyreverse ; do \
if head -1 debian/pylint/usr/bin/$$exec | grep "^#! */usr/bin" | grep "python" >/dev/null ; then \
sed -i "s@^#! */usr/bin/env \+python\$$@#!/usr/bin/python@" debian/pylint/usr/bin/$$exec; \
fi ; \
chmod a+x debian/pylint/usr/bin/$$exec; \
done
+ for exec in pylint pylint-gui symilar epylint pyreverse ; do \
+ if head -1 debian/pylint3/usr/bin/$$exec | grep "^#! */usr/bin" | grep "python" >/dev/null ; then \
+ sed -i "s@^#! */usr/bin/env \+python$(PYVERS3)\$$@#!/usr/bin/python3@" debian/pylint3/usr/bin/$$exec; \
+ fi ; \
+ chmod a+x debian/pylint3/usr/bin/$$exec; \
+ mv debian/pylint3/usr/bin/$$exec debian/pylint3/usr/bin/$${exec}3 ; \
+ done
install -m 644 elisp/pylint.el debian/pylint/usr/share/emacs/site-lisp/pylint/
+override_dh_installman:
+ dh_installman
+ for exec in pylint pylint-gui symilar epylint pyreverse ; do \
+ mv debian/pylint3/usr/share/man/man1/$$exec.1 debian/pylint3/usr/share/man/man1/$${exec}3.1 ; \
+ done
+
override_dh_installchangelogs:
dh_installchangelogs -i ChangeLog