Mercurial > libervia-web
comparison setup.py @ 451:1a0cec9b0f1e
better PEP-8 compliance
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 20 May 2014 10:54:03 +0200 |
parents | 981ed669d3b3 |
children | 636b6c477a87 |
comparison
equal
deleted
inserted
replaced
450:41aae13cab2b | 451:1a0cec9b0f1e |
---|---|
81 | 81 |
82 def custom_auto_options(self): | 82 def custom_auto_options(self): |
83 """Change options for twistd in the shell script | 83 """Change options for twistd in the shell script |
84 Mainly change the paths""" | 84 Mainly change the paths""" |
85 sh_buffer = "" | 85 sh_buffer = "" |
86 run_dir = os.path.dirname(self.sh_script_path) | |
87 with open(self.sh_script_path, 'r') as sh_file: | 86 with open(self.sh_script_path, 'r') as sh_file: |
88 for ori_line in sh_file: | 87 for ori_line in sh_file: |
89 if ori_line.startswith('DAEMON='): | 88 if ori_line.startswith('DAEMON='): |
90 dest_line = 'DAEMON=""\n' # we want to launch libervia as a daemon | 89 dest_line = 'DAEMON=""\n' # we want to launch libervia as a daemon |
91 elif ori_line.startswith('DATA_DIR='): | 90 elif ori_line.startswith('DATA_DIR='): |
232 hg_installed = subprocess.call('which hg', stdout=open('/dev/null', 'w'), shell=True) == 0 | 231 hg_installed = subprocess.call('which hg', stdout=open('/dev/null', 'w'), shell=True) == 0 |
233 if not hg_installed: | 232 if not hg_installed: |
234 modules_toinstall.append('mercurial')""" # hg can be installed from pypi | 233 modules_toinstall.append('mercurial')""" # hg can be installed from pypi |
235 | 234 |
236 if modules_toinstall: | 235 if modules_toinstall: |
237 if AUTO_DEB_OPT in install_opt: # auto debian installation is requested | 236 if AUTO_DEB_OPT in install_opt: # auto debian installation is requested |
238 # are we on a distribution using apt ? | 237 # are we on a distribution using apt ? |
239 apt_path = subprocess.Popen('which apt-get', stdout=subprocess.PIPE, shell=True).communicate()[0][:-1] | 238 apt_path = subprocess.Popen('which apt-get', stdout=subprocess.PIPE, shell=True).communicate()[0][:-1] |
240 else: | 239 else: |
241 apt_path = None | 240 apt_path = None |
242 | 241 |