code: def version_keyword(dist, attr, value):
      
      if value == "PBR":
          from pbr.util import setup_cfg_to_setup_kwargs
  
          path = "setup.cfg"
          parser = ConfigParser()
          if not os.path.exists(path):
              raise ValueError("file '%s' does not exist" % os.path.abspath(path))
          parser.read(path)
          config = {}
          for section in parser.sections():
              config[section] = dict(parser.items(section))
          attrs = setup_cfg_to_setup_kwargs(config)
          version = str(Version(attrs["name"]))
          os.environ["PBR_VERSION"] = version
      else:
          version = str(Version(dist.metadata.get_name()))
      dist.metadata.version = version
docs: Implements the actual version setup() keyword.