[Python-apps-commits] r11778 - in packages/pylint/trunk/debian (4 files)

morph at users.alioth.debian.org morph at users.alioth.debian.org
Sun Mar 1 18:45:48 UTC 2015


    Date: Sunday, March 1, 2015 @ 18:45:47
  Author: morph
Revision: 11778

* debian/pylint.emacsen*
  - improve Emacs integration; thanks a lot to Agustin Martin for the patches;
    Closes: #735743

Added:
  packages/pylint/trunk/debian/pylint.emacsen-compat
Modified:
  packages/pylint/trunk/debian/changelog
  packages/pylint/trunk/debian/pylint.emacsen-install
  packages/pylint/trunk/debian/pylint.emacsen-startup

Modified: packages/pylint/trunk/debian/changelog
===================================================================
--- packages/pylint/trunk/debian/changelog	2015-03-01 18:11:04 UTC (rev 11777)
+++ packages/pylint/trunk/debian/changelog	2015-03-01 18:45:47 UTC (rev 11778)
@@ -6,8 +6,11 @@
     - use the built code instead of the system-wide to build doc
   * debian/rules
     - run tests at build time; Closes: #575686
+  * debian/pylint.emacsen*
+    - improve Emacs integration; thanks a lot to Agustin Martin for the patches;
+      Closes: #735743
 
- -- Sandro Tosi <morph at debian.org>  Sun, 01 Mar 2015 18:10:47 +0000
+ -- Sandro Tosi <morph at debian.org>  Sun, 01 Mar 2015 18:45:08 +0000
 
 pylint (1.4.1-1) experimental; urgency=medium
 

Added: packages/pylint/trunk/debian/pylint.emacsen-compat
===================================================================
--- packages/pylint/trunk/debian/pylint.emacsen-compat	                        (rev 0)
+++ packages/pylint/trunk/debian/pylint.emacsen-compat	2015-03-01 18:45:47 UTC (rev 11778)
@@ -0,0 +1 @@
+0

Modified: packages/pylint/trunk/debian/pylint.emacsen-install
===================================================================
--- packages/pylint/trunk/debian/pylint.emacsen-install	2015-03-01 18:11:04 UTC (rev 11777)
+++ packages/pylint/trunk/debian/pylint.emacsen-install	2015-03-01 18:45:47 UTC (rev 11778)
@@ -12,12 +12,19 @@
 
 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}
@@ -33,13 +40,15 @@
 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

Modified: packages/pylint/trunk/debian/pylint.emacsen-startup
===================================================================
--- packages/pylint/trunk/debian/pylint.emacsen-startup	2015-03-01 18:11:04 UTC (rev 11777)
+++ packages/pylint/trunk/debian/pylint.emacsen-startup	2015-03-01 18:45:47 UTC (rev 11778)
@@ -10,8 +10,14 @@
 ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
 ;; xemacs19, emacs20, xemacs20...).  The compiled code is then
 ;; installed in a subdirectory of the respective site-lisp directory.
-;; We have to add this to the load-path:
-(setq load-path (cons (concat "/usr/share/"
-                              (symbol-name flavor)
-                              "/site-lisp/pylint") load-path))
-(load-library "pylint")
+
+;; Add path for byte-compiled pylint to load-path
+(debian-pkg-add-load-path-item
+ (concat "/usr/share/"
+	 (symbol-name flavor)
+	 "/site-lisp/pylint"))
+
+;; Some autoloads
+(autoload 'pylint "pylint")
+(add-hook 'python-mode-hook 'pylint-add-menu-items)
+(add-hook 'python-mode-hook 'pylint-add-key-bindings)




More information about the Python-apps-commits mailing list