Commit a36b2a16 authored by jocelyn's avatar jocelyn

+ cible check_dep

git-svn-id: file:///mnt/marvin-var/svn/magneto/trunk@86 f61d8a82-367e-4513-8f0b-2a88b49b8d76
parent 4cb1d768
......@@ -5,6 +5,7 @@ import os
import sys
import shutil
import pexpect
import telnetlib
from setuptools import setup, find_packages, Command
import psycopg
......@@ -12,6 +13,7 @@ import psycopg
def draw_line():
print "-" * 78
class MagnetoCommand(Command):
user_options = []
......@@ -24,6 +26,37 @@ class MagnetoCommand(Command):
def finalize_options(self):
class ChekcBinaryDeps(MagnetoCommand):
description = "Vérifie les dépendances binaires (comme vlc)"
def run(self):
print "Vérification des dépendances (hors python)"
print "VLC: ",
if os.path.exists('/usr/bin/vlc'):
# and 'VLC 0.9' in os.popen('vlc --version').read():
print 'OK'
else: print "!! VLC non trouvé"
print "cron: ",
if os.path.exists('/usr/bin/crontab'): print 'OK'
else: print "!! Cron est requis"
print "sudo: ",
if os.path.exists('/usr/bin/sudo'): print 'OK'
else: print "!! sudo est requis"
print "PostgreSQL: ",
print "OK"
except: print "!! Postgresql n'est pas installé ou n'écoute pas sur le réseau"
class SetupLighty(MagnetoCommand):
description = "Configure lighttpd pour magneto"
......@@ -187,6 +220,7 @@ setup(
"install_conf": InstallConf,
"setup_lighty": SetupLighty,
"make_dirs": MakeDirs,
"build_db": BuildDb
"build_db": BuildDb,
"check_binary_deps": ChekcBinaryDeps
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment