Added url_for_version to python/package.py (#12040)

This commit is contained in:
Shane R. Spencer 2019-07-16 17:50:43 -08:00 committed by Adam J. Stewart
parent 267d07e4b9
commit 1b16be538e

View File

@ -151,6 +151,10 @@ class Python(AutotoolsPackage):
# An in-source build with --enable-optimizations fails for python@3.X
build_directory = 'spack-build'
def url_for_version(self, version):
url = "https://www.python.org/ftp/python/{0}/Python-{1}.tgz"
return url.format(re.split('[a-z]', str(version))[0], version)
@when('@2.7:2.8,3.4:')
def patch(self):
# NOTE: Python's default installation procedure makes it possible for a