def fromfile(cls, path):
        version = os.path.splitext(os.path.basename(path))[0]

        with open(path) as fp:
            content = yaml.safe_load(fp.read())
            binaries = {}
            for (key, value) in content['binaries'].items():
                # convert between old and new schema
                if isinstance(value, str):
                    binaries[key] = {
                        'x86_64': value,
                    }
                else:
                    binaries[key] = value

        if 'version' in content:
            version = content['version']

        return cls(version, binaries)