forked from 0x2620/pandora
remove outdated django packages
This commit is contained in:
parent
6f7b57fc37
commit
f5cc740af2
1 changed files with 13 additions and 5 deletions
18
update.py
18
update.py
|
@ -166,16 +166,24 @@ if __name__ == "__main__":
|
|||
shutil.rmtree('.bzr')
|
||||
run('git', 'checkout', 'update.py')
|
||||
if old <= 5389:
|
||||
run('./bin/pip', 'install', '-r', 'requirements.txt')
|
||||
run('./pandora/manage.py', 'migrate', '--fake-initial', '--noinput')
|
||||
if os.path.exists('contrib'):
|
||||
shutil.rmtree('contrib')
|
||||
for path in (
|
||||
'lib/python2.7/site-packages/Django.egg-link',
|
||||
'lib/python2.7/site-packages/django-extensions.egg-link'
|
||||
'lib/python2.7/site-packages/django-extensions.egg-link',
|
||||
'lib/python2.7/site-packages/django-devserver.egg-link'
|
||||
):
|
||||
if os.path.exists(path):
|
||||
os.unlink(path)
|
||||
for path in (
|
||||
'src/django',
|
||||
'src/django-devserver',
|
||||
'src/django-extensions',
|
||||
):
|
||||
if os.path.exists(path):
|
||||
shutil.rmtree(path)
|
||||
if os.path.exists('contrib'):
|
||||
shutil.rmtree('contrib')
|
||||
run('./bin/pip', 'install', '-r', 'requirements.txt')
|
||||
run('./pandora/manage.py', 'migrate', '--fake-initial', '--noinput')
|
||||
service = 'pandora'
|
||||
print('Please install new init script for "%s" service:' % service)
|
||||
if os.path.exists('/etc/init'):
|
||||
|
|
Loading…
Reference in a new issue