diff options
| author | Matt Rendina <mrendina@stsci.edu> | 2017-05-24 14:45:44 -0400 | 
|---|---|---|
| committer | Matt Rendina <mrendina@stsci.edu> | 2017-05-24 14:45:44 -0400 | 
| commit | ee8cf0bc1c8449765ed67ca019e700161c356657 (patch) | |
| tree | 786c9d63bb7a2c92b9f3f47c4e1e84b1146eb7ff | |
| parent | 2a4958e9e8389edc2b8e117e1d45635706bbec1b (diff) | |
| parent | 6b9eeaf9321223e15c37b53effe75118aed9ef5d (diff) | |
| download | rambo-ee8cf0bc1c8449765ed67ca019e700161c356657.tar.gz | |
merge
| -rwxr-xr-x | rambo/rambo.py | 95 | ||||
| -rw-r--r-- | setup.py | 4 | 
2 files changed, 99 insertions, 0 deletions
| diff --git a/rambo/rambo.py b/rambo/rambo.py index f8b65c0..ad811f7 100755 --- a/rambo/rambo.py +++ b/rambo/rambo.py @@ -381,3 +381,98 @@ class MetaSet(object):              print('{0:>50}   {1}'.format(                  meta.canonical_name,                  statstr[meta.archived]), file=fh) +<<<<<<< HEAD:rambo/rambo.py +======= + + +# ---- + + +def main(argv=None): + +    if argv is None: +        argv = sys.argv + +    parser = argparse.ArgumentParser(prog='rambo') +    parser.add_argument('-p', '--platform', type=str) +    parser.add_argument( +            '--python', +            type=str, +            help='Python version to pass to conda machinery when rendering ' +            'recipes. "#.#" format. If not specified, the version of python' +            ' hosting conda_build.api is used.') +    parser.add_argument( +            '-m', +            '--manifest', +            type=str, +            help='Use this file to filter the list of recipes to process.') +    parser.add_argument( +            '-f', +            '--file', +            type=str, +            help='Send package list output to this file instead of stdout.') +    parser.add_argument( +            '-c', +            '--culled', +            action='store_true', +            help='Print the ordered list of package names reduced to the set' +            ' of packages that do not already exist in the channel specified' +            ' in the supplied manifest file.') +    parser.add_argument( +            '-d', +            '--details', +            action='store_true', +            help='Display details used in determining build order and/or ' +            'package culling.') +    parser.add_argument( +            '--dirty', +            action='store_true', +            help='Use the most recent pre-existing conda work directory for ' +            'each recipe instead of creating a new one. If a work directory ' +            'does not already exist, the recipe is processed in the normal ' +            'fashion. Used mostly for testing purposes.') +    parser.add_argument( +            '-v', +            '--version', +            action='version', +            version='%(prog)s ' + __version__, +            help='Display version information.') +    parser.add_argument('recipes_dir', type=str) +    args = parser.parse_args() + +    if args.version: +        print(__version__) +        os.exit(0) + +    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 + +    versions['numpy'] = DEFAULT_MINIMUM_NUMPY_VERSION + +    mset = metaSet( +            recipes_dir, +            platform=args.platform, +            versions=versions, +            dirty=args.dirty, +            manfile=args.manifest) + +    mset.multipass_optimize() + +    if args.details: +        mset.print_details(fh) +        if mset.channel: +            mset.print_status_in_channel(fh) +    elif args.culled: +        mset.print_culled(fh) +    else: +        mset.print(fh) + +if __name__ == "__main__": +    main() @@ -23,6 +23,10 @@ setup(      packages=find_packages(),      package_data={'': ['README.md', 'LICENSE.txt']},      entry_points = { +<<<<<<< HEAD          'console_scripts': ['rambo=rambo.__main__:main'], +======= +        'console_scripts': ['rambo=rambo.rambo:main'], +>>>>>>> 6b9eeaf9321223e15c37b53effe75118aed9ef5d      }  ) | 
