-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
833bbe2
commit 8a0b81a
Showing
1 changed file
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,30 @@ | ||
# script.py | ||
import argparse | ||
# setup wrapper for unicorn | ||
from subprocess import call | ||
import sys | ||
import glob | ||
import os | ||
|
||
|
||
if __name__ == '__main__': | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument('cmd', type=str, help='setup command') | ||
|
||
args = parser.parse_args() | ||
cmd = args.cmd | ||
|
||
# magellan | ||
call(["python", "magellan/setup.py", cmd]) | ||
args = [arg for arg in sys.argv[1:]] | ||
|
||
for module in glob.glob('*'): | ||
if os.path.isdir(module): | ||
if ('docs' in module)\ | ||
or ('build' in module)\ | ||
or ('dist' in module)\ | ||
or ('egg' in module): | ||
continue | ||
|
||
print '-------> trying to operate on module: ', module | ||
|
||
try: | ||
call( | ||
["python", "setup.py"] + args, | ||
cwd=module) | ||
except Exception: | ||
print 'cannot operate on module %s' % module | ||
|
||
|
||
|