Merge pull request #79 from kivy/buildozer_clean
implement the `clean` command.
This commit is contained in:
commit
8b15dcf1fa
1 changed files with 11 additions and 4 deletions
|
@ -78,7 +78,7 @@ class BuildozerCommandException(BuildozerException):
|
|||
|
||||
class Buildozer(object):
|
||||
|
||||
standard_cmds = ('clean', 'update', 'debug', 'release',
|
||||
standard_cmds = ('distclean', 'update', 'debug', 'release',
|
||||
'deploy', 'run', 'serve')
|
||||
|
||||
def __init__(self, filename='buildozer.spec', target=None):
|
||||
|
@ -333,7 +333,7 @@ class Buildozer(object):
|
|||
adderror('[app] "title" is missing')
|
||||
if not get('app', 'source.dir', ''):
|
||||
adderror('[app] "source.dir" is missing')
|
||||
|
||||
|
||||
package_name = get('app', 'package.name', '')
|
||||
if not package_name:
|
||||
adderror('[app] "package.name" is missing')
|
||||
|
@ -926,10 +926,17 @@ class Buildozer(object):
|
|||
copyfile(join(dirname(__file__), 'default.spec'), 'buildozer.spec')
|
||||
print 'File buildozer.spec created, ready to customize!'
|
||||
|
||||
def cmd_clean(self, *args):
|
||||
def cmd_distclean(self, *args):
|
||||
'''Clean the whole Buildozer environment.
|
||||
'''
|
||||
pass
|
||||
import sys
|
||||
print("Warning: Your ndk, sdk and all other cached packages will be"+\
|
||||
" removed. Continue? (y/n)")
|
||||
if sys.stdin.readline().lower()[0] == 'y':
|
||||
self.info('Clean the global build directory')
|
||||
if not exists(self.global_buildozer_dir):
|
||||
return
|
||||
rmtree(self.global_buildozer_dir)
|
||||
|
||||
def cmd_help(self, *args):
|
||||
'''Show the Buildozer help.
|
||||
|
|
Loading…
Add table
Reference in a new issue