[Python-apps-team] Bug#735743: Bug#735743: pylint fails to install in emacs : ERROR: pylint is broken

Agustin Martin agmartin at debian.org
Tue Feb 4 17:56:32 UTC 2014


On Fri, Jan 24, 2014 at 03:25:10PM +0100, Agustin Martin wrote:
> This should have been fixed in emacsen-common 2.0.6, but that version
> enabled the other check.
> 
> Please consider attached patch. Since pylint uses dh_installemacsen that
> compat file should be installed in the right place and bug fixed for 2.0.6.
> 
> > Loading 50pylint...
> > Loading pylint...
> > Error while loading 50pylint: Symbol's function definition is void:
> > define-compilation-mode
> 
> It is a lisp macro defined in Emacs compile.el (at least in emacs-snapshot)
> and is required by pylint.el. Do not understand why it is not pulled, if not
> present `require' should have complained about it.
> 
> Also note that pylint byte-compilation is too verbose and loads site files,
> which may not be needed for byte-compilation or even interfere with it. 
> Consider passing -no-site-file (should work for both Emacs and XEmacs)
> unless site files are really needed.
> 
> In particular /etc/emacs/site-start.d/50pylint.el seems to unconditionally
> load pylint, even if not dealing with a python file, thus loading pylint.el
> itself during pylint.el byte compilation
> 
> Loading /etc/emacs/site-start.d/50pylint.el (source)...
> 
> I do not know the pylint internals, but something like what is suggested in
> pylint.el
> 
> (autoload 'pylint "pylint")
> (add-hook 'python-mode-hook 'pylint-add-menu-items)
> (add-hook 'python-mode-hook 'pylint-add-key-bindings)
> 
> may be a better alternative.

Hi,

While we are at this I was playing a bit more with pylint. Please find
attached some more suggestions for pylint elisp. Tested only from the
packaging point of view (install ...), that is not using pylint mode
itself.

* 0002-debian-pylint.emacsen-install-Use-no-site-file.patch

  debian/pylint.emacsen-install: Do not load site files

* 0003-debian-pylint.emacsen-install-Use-symlinks-for-pylin.patch 

  debian/pylint.emacsen-install: Use and keep symlinks for .el files. 
  Mandatory per current policy.

* 0004-debian-pylint.emacsen-startup-Use-debian-pkg-add-loa.patch
 
  debian/pylint.emacsen-startup: Use `debian-pkg-add-load-path-item' to add
  path for byte-compiled pylint to load-path.

* 0005-debian-pylint.emacsen-startup-Do-not-unconditionally.patch

  debian/pylint.emacsen-startup: Do not unconditionally load "pylint" but
  set suggested autoloads.

Regards,

-- 
Agustin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-debian-pylint.emacsen-install-Use-no-site-file.patch
Type: text/x-diff
Size: 1194 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-apps-team/attachments/20140204/1ca6fad4/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-debian-pylint.emacsen-install-Use-symlinks-for-pylin.patch
Type: text/x-diff
Size: 893 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-apps-team/attachments/20140204/1ca6fad4/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-debian-pylint.emacsen-startup-Use-debian-pkg-add-loa.patch
Type: text/x-diff
Size: 1204 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-apps-team/attachments/20140204/1ca6fad4/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-debian-pylint.emacsen-startup-Do-not-unconditionally.patch
Type: text/x-diff
Size: 814 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-apps-team/attachments/20140204/1ca6fad4/attachment-0003.patch>


More information about the Python-apps-team mailing list