Skip to content

Commit

Permalink
small update
Browse files Browse the repository at this point in the history
  • Loading branch information
rieder committed Mar 1, 2023
1 parent ec92d8c commit e63737b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/amuse/community/mesa_r15140/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ def src_directory(self):
return os.path.join(self.directory(), 'src')

def unpack_downloaded_file(self, filename):
print("unpacking", filename)
print(f"unpacking {filename}")
if self.unpack:
if self.zip:
arguments = ['unzip']
else:
arguments = ['tar','xvf']
arguments = ['tar', 'xvf']
arguments.append(filename)
subprocess.call(
arguments,
Expand All @@ -48,7 +48,7 @@ def start(self):
url = self.url_template.format(version=self.version)
filename = self.filename_template.format(version=self.version)
filepath = os.path.join(self.src_directory(), filename)
print("downloading version", self.version, "from", url, "to", filename)
print(f"downloading version {self.version} from {url} to {filename}")
urllib.request.urlretrieve(url, filepath)
print("downloading finished")
self.unpack_downloaded_file(filename)
Expand All @@ -71,32 +71,32 @@ def get_crlibm():
instance.url_template = 'http://www.astro.wisc.edu/~townsend/resource/download/sdk2/src/crlibm-{version}.tar.gz'
instance.filename_template='crlibm-{version}.tar.gz'
instance.version = '1.0beta4'
instance.zip=False
instance.zip = False
instance.start()

def get_fpx3deps():
instance = GetCodeFromHttp()
instance.url_template = 'https://raw.githubusercontent.com/rhdtownsend/sdk2/master/profile/common/fpx3/fpx3_deps'
instance.filename_template='fpx3_deps'
instance.version = ''
instance.zip=False
instance.unpack=False
instance.zip = False
instance.unpack = False
instance.start()

def get_fpx3():
instance = GetCodeFromHttp()
instance.url_template = 'http://www.astro.wisc.edu/~townsend/resource/download/sdk2/src/fpx3.tar.gz'
instance.filename_template='fpx3.tar.gz'
instance.version = ''
instance.zip=False
instance.zip = False
instance.start()

def get_lapack95():
instance = GetCodeFromHttp()
instance.url_template = 'http://www.astro.wisc.edu/~townsend/resource/download/sdk2/src/lapack95.tgz'
instance.filename_template='lapack95.tar.gz'
instance.version = ''
instance.zip=False
instance.zip = False
instance.start()

def get_mesa():
Expand All @@ -107,15 +107,15 @@ def get_mesa():
else:
instance.url_template = "https://zenodo.org/record/4311514/files/mesa-r{version}.zip"

instance.version='15140'
instance.version = '15140'
instance.start()

def get_hdf5():
instance = GetCodeFromHttp()
instance.url_template = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-{version}/src/hdf5-{version}.tar.bz2"
instance.filename_template='hdf-{version}.tar.bz2'
instance.version = '1.12.0'
instance.zip=False
instance.zip = False
instance.start()


Expand Down

0 comments on commit e63737b

Please sign in to comment.