def run(self):
        spec = self.get_spec()
        assert not spec.is_local()

        if spec.is_url():
            return self._run_url(spec)

        data = self.get_meta(spec)

        try:
            chk = data['sha1']
        except __HOLE__:
            raise PgxnClientException(
                "sha1 missing from the distribution meta")

        with self.api.download(data['name'], SemVer(data['version'])) as fin:
            fn = network.download(fin, self.opts.target)

        self.verify_checksum(fn, chk)
        return fn
dataset/ETHPy150Open dvarrazzo/pgxnclient/pgxnclient/commands/install.py/Download.run