Esempio n. 1
0
File: parser.py Progetto: Malex/pyg
    def download(args):
        '''
        Download a package
        '''

        if isinstance(args.index_url, ITERABLE_T):
            args.index_url = args.index_url[0]

        args_manager['install']['packages_url'] = args.index_url + '/simple'
        args_manager['install']['index_url'] = args.index_url + '/pypi'

        if args.download_dir != args_manager['download']['download_dir']:
            args_manager['download']['download_dir'] = args.download_dir
        if args.prefer != args_manager['download']['prefer']:
            args_manager['download']['prefer'] = args.prefer
        if args.unpack:
            args_manager['download']['unpack'] = True
        opts.download_func(args)