summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorXavier Thomas <43476211+xavierohan@users.noreply.github.com>2020-01-24 11:56:49 +0530
committerGitHub <noreply@github.com>2020-01-24 11:56:49 +0530
commit35e760c45524c452d84bfdf9df46046a203b9146 (patch)
tree9668fd064ec5b9489a4b158a8b25647cb707fbac /tools
parent9982a5855e33c03a4056d594eaf1122c24a8df70 (diff)
downloadnumpy-35e760c45524c452d84bfdf9df46046a203b9146.tar.gz
Updated openblas_support.py with f-string
Diffstat (limited to 'tools')
-rw-r--r--tools/openblas_support.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/openblas_support.py b/tools/openblas_support.py
index fdae6ab76..4c79d367c 100644
--- a/tools/openblas_support.py
+++ b/tools/openblas_support.py
@@ -43,27 +43,25 @@ def download_openblas(target, arch, ilp64):
fnsuffix = {None: "", "64_": "64_"}[ilp64]
filename = ''
if arch in ('aarch64', 'ppc64le', 's390x'):
- filename = '{0}/openblas{1}-{2}-manylinux2014_{3}.tar.gz'.format(
- RACKSPACE, fnsuffix, OPENBLAS_LONG, arch)
+ filename = f'{RACKSPACE}/openblas{fnsuffix}-{OPENBLAS_LONG}-manylinux2014_{arch}
typ = 'tar.gz'
typ = 'tar.gz'
elif arch == 'darwin':
- filename = '{0}/openblas{1}-{2}-macosx_10_9_x86_64-gf_1becaaa.tar.gz'.format(
- RACKSPACE, fnsuffix, OPENBLAS_LONG)
+ filename = f'{RACKSPACE}/openblas{fnsuffix}-{OPENBLAS_LONG}-macosx_10_9_x86_64-gf_1becaaa.tar.gz'
typ = 'tar.gz'
elif arch == 'windows':
if IS_32BIT:
suffix = 'win32-gcc_7_1_0.zip'
else:
suffix = 'win_amd64-gcc_7_1_0.zip'
- filename = '{0}/openblas{1}-{2}-{3}'.format(RACKSPACE, fnsuffix, OPENBLAS_LONG, suffix)
+ filename = f'{RACKSPACE}/openblas{fnsuffix}-{OPENBLAS_LONG}-{suffix}'
typ = 'zip'
elif 'x86' in arch:
if IS_32BIT:
suffix = 'manylinux1_i686.tar.gz'
else:
suffix = 'manylinux1_x86_64.tar.gz'
- filename = '{0}/openblas{1}-{2}-{3}'.format(RACKSPACE, fnsuffix, OPENBLAS_LONG, suffix)
+ filename = f'{RACKSPACE}/openblas{fnsuffix}-{OPENBLAS_LONG}-{suffix}'
typ = 'tar.gz'
if not filename:
return None
@@ -72,7 +70,7 @@ def download_openblas(target, arch, ilp64):
with open(target, 'wb') as fid:
fid.write(urlopen(filename).read())
except HTTPError:
- print('Could not download "%s"' % filename)
+ print(f'Could not download "{filename}"')
return None
return typ
@@ -208,10 +206,10 @@ def test_setup(arches):
try:
target = setup_openblas(arch, ilp64)
except:
- print('Could not setup %s' % arch)
+ print(f'Could not setup {arch}')
raise
if not target:
- raise RuntimeError('Could not setup %s' % arch)
+ raise RuntimeError(f'Could not setup {arch}')
print(target)
if arch == 'windows':
if not target.endswith('.a'):