Franck Pommereau

fixed emacs dependency in setup.py

...@@ -9,10 +9,14 @@ all: ...@@ -9,10 +9,14 @@ all:
9 @echo " next-ppa increments debian/PPA" 9 @echo " next-ppa increments debian/PPA"
10 @echo " lang build generated files in snakes/lang" 10 @echo " lang build generated files in snakes/lang"
11 @echo " emacs compile Emacs files" 11 @echo " emacs compile Emacs files"
12 + @echo " pip upload to PyPI"
12 13
13 committed: 14 committed:
14 hg summary|grep -q '^commit: (clean)$$' 15 hg summary|grep -q '^commit: (clean)$$'
15 16
17 +pip:
18 + python setup.py upload
19 +
16 next-deb: 20 next-deb:
17 echo 1 > debian/PPA 21 echo 1 > debian/PPA
18 echo $$((1+$$(cat debian/VERSION))) > debian/VERSION 22 echo $$((1+$$(cat debian/VERSION))) > debian/VERSION
......
1 precise 12.04 LTS 1 precise 12.04 LTS
2 -saucy 13.10
......
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 -import sys, os 3 +import subprocess
4 from distutils.core import setup 4 from distutils.core import setup
5 5
6 def doc_files() : 6 def doc_files() :
...@@ -25,11 +25,13 @@ particular, plugins are provided to implement the operations ...@@ -25,11 +25,13 @@ particular, plugins are provided to implement the operations
25 usually found in the PBC and M-nets family.""" 25 usually found in the PBC and M-nets family."""
26 26
27 if __name__ == "__main__" : 27 if __name__ == "__main__" :
28 - print("Compiling Emacs files...") 28 + try :
29 - if os.system("emacs -batch -f batch-byte-compile utils/abcd-mode.el") : 29 + subprocess.check_output(["emacs", "-batch", "-f",
30 + "batch-byte-compile", "utils/abcd-mode.el"],
31 + stderr=subprocess.STDOUT)
30 emacs = [("share/emacs/site-lisp", ["utils/abcd-mode.el", 32 emacs = [("share/emacs/site-lisp", ["utils/abcd-mode.el",
31 "utils/abcd-mode.elc"])] 33 "utils/abcd-mode.elc"])]
32 - else : 34 + except :
33 emacs = [("share/emacs/site-lisp", ["utils/abcd-mode.el"])] 35 emacs = [("share/emacs/site-lisp", ["utils/abcd-mode.el"])]
34 # 36 #
35 setup(name="SNAKES", 37 setup(name="SNAKES",
......