def _parse_version(self, value):
        """Parses `version` option value.

        :param value:
        :rtype: str

        """
        version = self._parse_file(value, self.root_dir)

        if version != value:
            version = version.strip()
            # Be strict about versions loaded from file because it's easy to
            # accidentally include newlines and other unintended content
            try:
                Version(version)
            except InvalidVersion:
                raise OptionError(
                    f'Version loaded from {value} does not '
                    f'comply with PEP 440: {version}'
                )

            return version

        return expand.version(self._parse_attr(value, self.package_dir, self.root_dir))
Parses `version` option value.

        :param value:
        :rtype: str

        
product/gradle-plugin/src/main/python/setuptools/config/setupcfg.py