Commit 9a4fe11d authored by Marco Mariani's avatar Marco Mariani

autoupdate through easy_install before running slapprepare

parent 733a7878
......@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '1.0a4'
version = '1.0a5'
name = 'slapprepare'
long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n"
......@@ -24,7 +24,8 @@ setup(name=name,
zip_safe=False,
entry_points={
'console_scripts': [
'slapprepare = slapprepare.slapprepare:main',
'slapprepare = slapprepare.autoupdate:main',
'slapprepare-raw = slapprepare.slapprepare:main',
'slapupdate = slapprepare.slapupdate:main',
]
},
......
import os
import subprocess
import sys
def do_update():
print 'Updating slapreport'
subprocess.call(['easy_install', '-U', 'slapprepare'])
def main():
if '--no-update' in sys.argv:
sys.argv.remove('--no-update')
else:
do_update()
args = [
os.path.join(os.path.dirname(sys.argv[0]), 'slapprepare-raw')
] + sys.argv[1:]
subprocess.call(args)
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