Bug#735743: [Python-apps-team] Bug#735743: pylint fails to install in emacs : ERROR: pylint is broken
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 From 37fb901fe99e47bcb802db3b1cc3a1e8cc8b80cf Mon Sep 17 00:00:00 2001 From: Agustin Martin Domingo agmar...@debian.org Date: Tue, 4 Feb 2014 17:37:50 +0100 Subject: [PATCH 2/5] debian/pylint.emacsen-install: Use (-|--)no-site-file. --- debian/pylint.emacsen-install | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/debian/pylint.emacsen-install b/debian/pylint.emacsen-install index 66a8480..7c04cb0 100644 --- a/debian/pylint.emacsen-install +++ b/debian/pylint.emacsen-install @@ -12,12 +12,19 @@ if [ ${FLAVOR} = emacs ]; then exit 0; fi echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} -#FLAVORTEST=`echo $FLAVOR | cut -c-6` -#if [ ${FLAVORTEST} = xemacs ] ; then -#SITEFLAG=-no-site-file -#else -#SITEFLAG=--no-site-file -#fi +case $FLAVOR in +xemacs*) +SITEFLAG=-no-site-file +;; +emacs*) +SITEFLAG=--no-site-file +;; +*) +echo install/${PACKAGE}: Ignoring emacsen flavour [${FLAVOR}] +exit 0 +;; +esac + FLAGS=${SITEFLAG} -q -batch -l path.el -f batch-byte-compile ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} -- 1.8.5.3 From 0165fb9a35654f06e0852a53901e53189cc2c05d Mon Sep 17 00:00:00 2001 From: Agustin Martin Domingo agmar...@debian.org Date: Tue, 4 Feb 2014 18:29:43 +0100 Subject: [PATCH 3/5] debian/pylint.emacsen-install: Use symlinks for pylint .el files and keep them. --- debian/pylint.emacsen-install | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/pylint.emacsen-install b/debian/pylint.emacsen-install index 7c04cb0..5ace32f 100644 --- a/debian/pylint.emacsen-install +++ b/debian/pylint.emacsen-install @@ -40,13 +40,15 @@ fi install -m 755 -d ${ELCDIR} cd ${ELDIR} FILES=`echo *.el` -cp ${FILES} ${ELCDIR} cd ${ELCDIR} +for i in ${FILES}; do +ln -fs ${ELDIR}/$i . +done cat EOF path.el (setq load-path (cons . load-path) byte-compile-warnings nil) EOF ${FLAVOR} ${FLAGS} ${FILES} -rm -f *.el path.el +rm -f path.el exit 0 -- 1.8.5.3 From 0babaddeb4442a1229f152e9eaa25d601383c42d Mon Sep 17 00:00:00 2001 From: Agustin Martin Domingo agmar...@debian.org Date: Tue, 4 Feb 2014 17:42:07 +0100 Subject: [PATCH 4/5] debian/pylint.emacsen-startup: Use `debian-pkg-add-load-path-item' to add path for byte-compiled pylint to load-path. --- debian/pylint.emacsen-startup | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/pylint.emacsen-startup b/debian/pylint.emacsen-startup index 646bd81..e73060a 100644 --- a/debian/pylint.emacsen-startup +++ b/debian/pylint.emacsen-startup @@ -10,8 +10,11 @@
Bug#735743: [Python-apps-team] Bug#735743: pylint fails to install in emacs : ERROR: pylint is broken
On Thu, Jan 23, 2014 at 09:30:42PM +0100, Sébastien Kalt wrote: Hi, 2014/1/18 Sandro Tosi mo...@debian.org Hello, what version of emacs23 do you have? # dpkg -l |grep emacs23 ii emacs23 23.4+1-4.1+b1 amd64The GNU Emacs editor (with GTK+ user interface) [...] 2014/1/20 Agustin Martin agmar...@debian.org On Sat, Jan 18, 2014 at 04:53:52PM +0100, Sandro Tosi wrote: Hello, what version of emacs23 do you have? Recently had this issue in dictionaries-common. Is emacsen-common version what matters here, # dpkg -l |grep emacsen-common ii emacsen-common 2.0.7 all Common facilities for all emacsen If I downgrade emacsen-common to stable version (2.0.5), I still have an error : Preparing to unpack .../pylint_1.1.0-1_all.deb ... given is experimental at /usr/lib/emacsen-common/emacs-package-install line 43. when is experimental at /usr/lib/emacsen-common/emacs-package-install line 45. when is experimental at /usr/lib/emacsen-common/emacs-package-install line 46. Unpacking pylint (1.1.0-1) ... Processing triggers for man-db (2.6.5-3) ... Setting up pylint (1.1.0-1) ... given is experimental at /usr/lib/emacsen-common/emacs-package-install line 43. when is experimental at /usr/lib/emacsen-common/emacs-package-install line 45. when is experimental at /usr/lib/emacsen-common/emacs-package-install line 46. Install pylint for emacs Install pylint for emacs23 install/pylint: Handling install for emacsen flavor emacs23 [...] Hi, 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. Regards, -- Agustin From cae4fcae1c9e6e9cbd912d8ee0623176978729ee Mon Sep 17 00:00:00 2001 From: Agustin Martin Domingo agmar...@debian.org Date: Fri, 24 Jan 2014 14:44:07 +0100 Subject: [PATCH] debian/pylint.emacsen-install: New file with zero value to comply with emacsen-common policy (Closes: #735743). --- debian/pylint.emacsen-compat | 1 + 1 file changed, 1 insertion(+) create mode 100644 debian/pylint.emacsen-compat diff --git a/debian/pylint.emacsen-compat b/debian/pylint.emacsen-compat new file mode 100644 index 000..573541a --- /dev/null +++ b/debian/pylint.emacsen-compat @@ -0,0 +1 @@ +0 -- 1.8.5.2
Bug#735743: [Python-apps-team] Bug#735743: pylint fails to install in emacs : ERROR: pylint is broken
Hi, 2014/1/18 Sandro Tosi mo...@debian.org Hello, what version of emacs23 do you have? # dpkg -l |grep emacs23 ii emacs23 23.4+1-4.1+b1 amd64The GNU Emacs editor (with GTK+ user interface) [...] 2014/1/20 Agustin Martin agmar...@debian.org On Sat, Jan 18, 2014 at 04:53:52PM +0100, Sandro Tosi wrote: Hello, what version of emacs23 do you have? Recently had this issue in dictionaries-common. Is emacsen-common version what matters here, # dpkg -l |grep emacsen-common ii emacsen-common 2.0.7 all Common facilities for all emacsen If I downgrade emacsen-common to stable version (2.0.5), I still have an error : Preparing to unpack .../pylint_1.1.0-1_all.deb ... given is experimental at /usr/lib/emacsen-common/emacs-package-install line 43. when is experimental at /usr/lib/emacsen-common/emacs-package-install line 45. when is experimental at /usr/lib/emacsen-common/emacs-package-install line 46. Unpacking pylint (1.1.0-1) ... Processing triggers for man-db (2.6.5-3) ... Setting up pylint (1.1.0-1) ... given is experimental at /usr/lib/emacsen-common/emacs-package-install line 43. when is experimental at /usr/lib/emacsen-common/emacs-package-install line 45. when is experimental at /usr/lib/emacsen-common/emacs-package-install line 46. Install pylint for emacs Install pylint for emacs23 install/pylint: Handling install for emacsen flavor emacs23 [...] Loading 50pylint... Loading pylint... Error while loading 50pylint: Symbol's function definition is void: define-compilation-mode And pylint isn't available in emacs Regards, Sebastien -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#735743: [Python-apps-team] Bug#735743: pylint fails to install in emacs : ERROR: pylint is broken
On Sat, Jan 18, 2014 at 04:53:52PM +0100, Sandro Tosi wrote: Hello, what version of emacs23 do you have? Recently had this issue in dictionaries-common. Is emacsen-common version what matters here, emacsen-common (2.0.6) unstable; urgency=low [...] * Complain loudly if an add-on package appears to be broken. Add validate_add_on_pkg() to verify that an add-on package's invocations match its style, and call it from emacs-package-install and emacs-package-remove. [...] If you use dh_installemacsen, just need to add something like debian/emacsen-compat containing a plain 0. See emasen-common policy, look for emacsen-common compatibility level. Hope this helps, Regards, -- Agustin -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#735743: [Python-apps-team] Bug#735743: pylint fails to install in emacs : ERROR: pylint is broken
Hello, what version of emacs23 do you have? with 23.4+1-4.1 here it istalls fine: $ sudo dpkg-reconfigure pylint Remove pylint for emacs23 remove/pylint: purging byte-compiled files for emacs23 given is experimental at /usr/lib/emacsen-common/emacs-package-install line 43. when is experimental at /usr/lib/emacsen-common/emacs-package-install line 45. when is experimental at /usr/lib/emacsen-common/emacs-package-install line 46. Install pylint for emacs Install pylint for emacs23 install/pylint: Handling install for emacsen flavor emacs23 Loading 00debian-vars... Loading /etc/emacs/site-start.d/50a2ps.el (source)... Loading /etc/emacs/site-start.d/50autoconf.el (source)... Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)... Loading debian-ispell... Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)... Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)... Loading /etc/emacs/site-start.d/50emacs-goodies-el.el (source)... Loading /etc/emacs/site-start.d/50global.el (source)... Loading /etc/emacs/site-start.d/50psvn.el (source)... Loading /etc/emacs/site-start.d/50pylint.el (source)... Loading /usr/share/emacs23/site-lisp/pylint/pylint.el (source)... Loading /etc/emacs/site-start.d/50python-docutils.el (source)... Wrote /usr/share/emacs23/site-lisp/pylint/pylint.elc Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org