/usr/share/pyshared/pymecavideo/install.py is in python-mecavideo 6.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # -*- coding: utf-8 -*-
##installation script-
import subprocess, os
os.chdir("src")
cmd2 = subprocess.Popen(["make"],stdout=subprocess.PIPE)
cmd2.poll()
cmd2.wait()
os.chdir("..")
if os.getuid()==0 :
cmd2 = subprocess.Popen(["python","setup.py","install"],stdout=subprocess.PIPE)
cmd2.poll()
cmd2.wait()
output=cmd2.stdout.readlines()
for ligne in output :
if "site-packages" in ligne :
liste = ligne.split()
for i in liste :
if "site-packages" in i :
chemin_l = os.path.split(i)
for j in chemin_l:
if "site-packages" in j:
install_dir = j
print "pymecavideo installé à", install_dir
if install_dir :
print "OK"
cmd3 = subprocess.Popen(["cp","-Rp","data",os.path.join(install_dir,"pymecavideo")],stdout=subprocess.PIPE)
cmd3.poll()
cmd3.wait()
print cmd3.stdout.readlines()
cmd4 = subprocess.Popen(["chmod","755",os.path.join(install_dir,"pymecavideo/data")],stdout=subprocess.PIPE)
cmd4.poll()
cmd4.wait()
print cmd4.stdout.readlines()
else :
print "ERREUR, veuillez lancer ce script avec des droits supérieurs (sudo ou logguez vous en root"
|