Skip to content

Commit

Permalink
Refactor argument parsing to use single quotes for consistency in bac…
Browse files Browse the repository at this point in the history
…kend.py
  • Loading branch information
fbriol committed Nov 22, 2024
1 parent ed3d78f commit 7732013
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _custom_build/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def usage(args: dict[str, str | list[str] | None]) -> argparse.Namespace:
parser.add_argument('--generator', help='Selected CMake generator')
parser.add_argument('--cmake-args', help='Additional arguments for CMake')
parser.add_argument('--mkl', help='Using MKL as BLAS library')
return parser.parse_args(args=[f"--{k}={v}" for k, v in args.items()])
return parser.parse_args(args=[f'--{k}={v}' for k, v in args.items()])


def decode_bool(value: str | None) -> bool:
Expand All @@ -39,11 +39,11 @@ def run_setup(self, setup_script='setup.py'):
args = usage(self.config_settings or {}) # type: ignore[arg-type]
setuptools_args = []
if args.cxx_compiler:
setuptools_args.append(f"--cxx-compiler={args.cxx_compiler}")
setuptools_args.append(f'--cxx-compiler={args.cxx_compiler}')
if args.generator:
setuptools_args.append(f"--generator={args.generator}")
setuptools_args.append(f'--generator={args.generator}')
if args.cmake_args:
setuptools_args.append(f"--cmake-args={args.cmake_args}")
setuptools_args.append(f'--cmake-args={args.cmake_args}')
if decode_bool(args.mkl):
setuptools_args.append('--mkl=yes')

Expand Down

0 comments on commit 7732013

Please sign in to comment.