Reputation: 37
I'm converting a Bash script to Python. I have been looking for a replacement for the "make install" - line. Is there any?
print "Installing from the sources"
urllib.urlretrieve("http://"+backupserver+"/backup-manager.tar.gz","backup-manager.tar.gz")
tar = tarfile.open("backup-manager.tar.gz", "r:gz")
tar.extractall()
tar.close()
os.chdir("Backup-Manager-0.7.10")
make install
Upvotes: 0
Views: 1039
Reputation: 654
import subprocess
subprocess.call(['make', 'install'])
Should do the trick.
If you want the output look at this
Upvotes: 2
Reputation: 512
You can use subprocess
or else
import os
os.system("make install")
Some information about Calling an external command in Python
Upvotes: 1