Patch by Owen Williams to accept custom MANIFEST filename.
This commit is contained in:
parent
f6e1df09f5
commit
39678b8bb8
@ -53,10 +53,10 @@ class _DefaultFileList(list):
|
|||||||
self.append('setup.py')
|
self.append('setup.py')
|
||||||
|
|
||||||
class _ManifestFileList(list):
|
class _ManifestFileList(list):
|
||||||
def __init__(self):
|
def __init__(self, manifest=None):
|
||||||
self.append('MANIFEST')
|
self.append(manifest)
|
||||||
|
|
||||||
f = open('MANIFEST','r')
|
f = open(manifest,'r')
|
||||||
for line in f.readlines():
|
for line in f.readlines():
|
||||||
self.append(line[:-1])
|
self.append(line[:-1])
|
||||||
f.close()
|
f.close()
|
||||||
@ -129,9 +129,9 @@ def cmd_dev():
|
|||||||
else:
|
else:
|
||||||
print 'ERROR - A bundle with the same name is already installed.'
|
print 'ERROR - A bundle with the same name is already installed.'
|
||||||
|
|
||||||
def cmd_dist():
|
def cmd_dist(manifest):
|
||||||
if os.path.isfile('MANIFEST'):
|
if os.path.isfile(manifest):
|
||||||
file_list = _ManifestFileList()
|
file_list = _ManifestFileList(manifest)
|
||||||
elif os.path.isdir('.git'):
|
elif os.path.isdir('.git'):
|
||||||
file_list = _GitFileList()
|
file_list = _GitFileList()
|
||||||
elif os.path.isdir('.svn'):
|
elif os.path.isdir('.svn'):
|
||||||
@ -148,8 +148,8 @@ def cmd_dist():
|
|||||||
|
|
||||||
bundle_zip.close()
|
bundle_zip.close()
|
||||||
|
|
||||||
def cmd_install(prefix):
|
def cmd_install(prefix, manifest=None):
|
||||||
cmd_dist()
|
cmd_dist(manifest)
|
||||||
cmd_uninstall(prefix)
|
cmd_uninstall(prefix)
|
||||||
_extract_bundle(_get_package_name(), _get_install_dir(prefix))
|
_extract_bundle(_get_package_name(), _get_install_dir(prefix))
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ def cmd_uninstall(prefix):
|
|||||||
def cmd_clean():
|
def cmd_clean():
|
||||||
os.path.walk('.', _delete_backups, None)
|
os.path.walk('.', _delete_backups, None)
|
||||||
|
|
||||||
def start():
|
def start(manifest='MANIFEST'):
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
cmd_help()
|
cmd_help()
|
||||||
elif sys.argv[1] == 'build':
|
elif sys.argv[1] == 'build':
|
||||||
@ -169,9 +169,9 @@ def start():
|
|||||||
elif sys.argv[1] == 'dev':
|
elif sys.argv[1] == 'dev':
|
||||||
cmd_dev()
|
cmd_dev()
|
||||||
elif sys.argv[1] == 'dist':
|
elif sys.argv[1] == 'dist':
|
||||||
cmd_dist()
|
cmd_dist(manifest)
|
||||||
elif sys.argv[1] == 'install' and len(sys.argv) == 3:
|
elif sys.argv[1] == 'install' and len(sys.argv) == 3:
|
||||||
cmd_install(sys.argv[2])
|
cmd_install(sys.argv[2], manifest)
|
||||||
elif sys.argv[1] == 'uninstall' and len(sys.argv) == 3:
|
elif sys.argv[1] == 'uninstall' and len(sys.argv) == 3:
|
||||||
cmd_uninstall(sys.argv[2])
|
cmd_uninstall(sys.argv[2])
|
||||||
elif sys.argv[1] == 'clean':
|
elif sys.argv[1] == 'clean':
|
||||||
|
Loading…
Reference in New Issue
Block a user