aboutsummaryrefslogtreecommitdiff
path: root/rambo/__main__.py
diff options
context:
space:
mode:
authorMatt Rendina <rendinam@users.noreply.github.com>2018-05-03 11:15:08 -0400
committerGitHub <noreply@github.com>2018-05-03 11:15:08 -0400
commitea8bcba10d429c226d3600b4d771f210b6e9d5f7 (patch)
tree23cadd5b0cdbfd7f88f3d2b62024bf3dab646a41 /rambo/__main__.py
parent2383af2eeba0a107d9aed765c0f5d0f0b0444868 (diff)
parent9d3d0416b7649b5fc42f8d1d3a6c41023d75c1bb (diff)
downloadrambo-ea8bcba10d429c226d3600b4d771f210b6e9d5f7.tar.gz
Merge pull request #9 from rendinam/filter_nonpy
Add filter-nonpy flag; minor refactor of culled -dev recipe handling;
Diffstat (limited to 'rambo/__main__.py')
-rwxr-xr-xrambo/__main__.py29
1 files changed, 20 insertions, 9 deletions
diff --git a/rambo/__main__.py b/rambo/__main__.py
index a76fb24..d23c6e8 100755
--- a/rambo/__main__.py
+++ b/rambo/__main__.py
@@ -87,6 +87,12 @@ def main(argv=None):
'does not already exist, the recipe is processed in the normal '
'fashion. Used mostly for testing purposes.')
parser.add_argument(
+ '--filter-nonpy',
+ action='store_true',
+ default=False,
+ help='Eliminate from the package list any packages that do '
+ 'not depend on python.')
+ parser.add_argument(
'-v',
'--version',
action='version',
@@ -97,10 +103,6 @@ def main(argv=None):
recipes_dir = os.path.normpath(args.recipes_dir)
- fh = None
- if args.file:
- fh = open(args.file, 'w')
-
versions = {'python': '', 'numpy': ''}
if args.python:
versions['python'] = args.python
@@ -115,24 +117,33 @@ def main(argv=None):
else:
platform_arch = get_platform_arch()
+ if args.filter_nonpy and not args.culled:
+ print('--filter-nonpy specified. Enabling manifest culling.')
+ args.culled = True
+
mset = meta.MetaSet(
recipes_dir,
platform_arch,
versions=versions,
culled=args.culled,
dirty=args.dirty,
+ filter_nonpy=args.filter_nonpy,
manfile=args.manifest)
mset.multipass_optimize()
if args.details:
- mset.print_details(fh)
+ mset.print_details()
if mset.channel:
- mset.print_status_in_channel(fh)
- elif args.culled:
- mset.print_culled(fh)
+ mset.print_status_in_channel()
+ elif args.culled:
+ mset.print_culled()
+
+ if args.file:
+ mset.write(args.file)
else:
- mset.print(fh)
+ mset.print()
+
if __name__ == "__main__":
main()