'Returns a URL from which the specified version of this package
may be downloaded.
version: class Version
The version for which a URL is sought.
See Class Version (version.py)'

def url_for_version(self, version):

    if (not isinstance(version, Version)):
        version = Version(version)
    cls = self.__class__
    if (not (hasattr(cls, 'url') or self.version_urls())):
        raise NoURLError(cls)
    version_urls = self.version_urls()
    if (version in version_urls):
        return version_urls[version]
    return spack.url.substitute_version(self.nearest_url(version), self.url_version(version))
