aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/scalapack.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-09-22 09:35:17 -0700
committerDylan Baker <dylan@pnwbakers.com>2020-09-22 17:57:03 -0700
commitb034f8cf610d7c3d71fa536f2ec1669e7f2f3c7c (patch)
tree9da089d2553469adfbcccad8758d2d39d26bcf91 /mesonbuild/dependencies/scalapack.py
parent94ea9d97bece30f209665032850ad0920b461170 (diff)
downloadmeson-b034f8cf610d7c3d71fa536f2ec1669e7f2f3c7c.zip
meson-b034f8cf610d7c3d71fa536f2ec1669e7f2f3c7c.tar.gz
meson-b034f8cf610d7c3d71fa536f2ec1669e7f2f3c7c.tar.bz2
pylint: Turn on warnings for incorrect number of args
This catches some very real errors. The one in scalapack is pretty silly actually, it's failing to figure out that the exploded list is at least two arguments. However, the code is actually clearer by not using a list and exploding it, so I've done that and pylint is happy too.
Diffstat (limited to 'mesonbuild/dependencies/scalapack.py')
-rw-r--r--mesonbuild/dependencies/scalapack.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/scalapack.py b/mesonbuild/dependencies/scalapack.py
index 8774746..0147e0b 100644
--- a/mesonbuild/dependencies/scalapack.py
+++ b/mesonbuild/dependencies/scalapack.py
@@ -109,10 +109,10 @@ class MKLPkgConfigDependency(PkgConfigDependency):
if self.clib_compiler.id == 'gcc':
for i, a in enumerate(self.link_args):
# only replace in filename, not in directory names
- parts = list(os.path.split(a))
- if 'mkl_intel_lp64' in parts[-1]:
- parts[-1] = parts[-1].replace('intel', 'gf')
- self.link_args[i] = '/' + os.path.join(*parts)
+ dirname, basename = os.path.split(a)
+ if 'mkl_intel_lp64' in basename:
+ basename = basename.replace('intel', 'gf')
+ self.link_args[i] = '/' + os.path.join(dirname, basename)
# MKL pkg-config omits scalapack
# be sure "-L" and "-Wl" are first if present
i = 0