From f6ce75e07a25858fa795ea1a49820a533e801616 Mon Sep 17 00:00:00 2001 From: Cole Kendrick Date: Thu, 26 Sep 2024 07:59:21 -0700 Subject: [PATCH] Revert to manual parsing due to pip issues --- setup.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/setup.py b/setup.py index 4783f83..e3f06b7 100644 --- a/setup.py +++ b/setup.py @@ -18,19 +18,20 @@ librom_dir = None install_scalapack = False use_mfem = True +# TODO: fix this.. passing options through pip to setuptools with PEP517 is not working for arg in sys.argv: - if (arg[:13] == "--librom_dir="): + if (arg[:13] == "--librom_dir=" or arg[:13] == "--librom-dir="): librom_dir = arg[13:] sys.argv.remove(arg) -# if "--install_scalapack" in sys.argv: -# install_scalapack = True -# sys.argv.remove("--install_scalapack") -# if "--no-mfem" in sys.argv: -# use_mfem = False -# sys.argv.remove("--no-mfem") -# if "--use-mfem" in sys.argv: -# use_mfem = True -# sys.argv.remove("--use-mfem") + if (arg[:19] == "--install_scalapack"): + install_scalapack = True + sys.argv.remove(arg) + if (arg[:9] == "--no-mfem"): + use_mfem = False + sys.argv.remove(arg) + if (arg[:10] == "--use-mfem"): + use_mfem = True + sys.argv.remove(arg) # Convert distutils Windows platform specifiers to CMake -A arguments PLAT_TO_CMAKE = { @@ -195,7 +196,7 @@ def build_extension(self, ext: CMakeExtension) -> None: ["cmake", ext.sourcedir, *cmake_args], cwd=build_temp, check=True ) subprocess.run( - ["cmake", "--build", ".", *build_args], cwd=build_temp, check=True + ["cmake", "--build", ".", "-j 8", "-v", *build_args], cwd=build_temp, check=True )