From dd81a49e689f45f515da0e090c0f90e99757a098 Mon Sep 17 00:00:00 2001 From: cmoineau <cyril.moineau@cea.fr> Date: Fri, 4 Aug 2023 06:46:53 +0000 Subject: [PATCH] Update setup.py to use envrironment variable to specify CMakeList install path. --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index cc3d5dbb8..0b0f66e91 100644 --- a/setup.py +++ b/setup.py @@ -65,9 +65,10 @@ class CMakeBuild(build_ext): # Impose to use the executable of the python # used to launch setup.py to setup PythonInterp param_py = "-DPYTHON_EXECUTABLE=" + sys.executable - - self.spawn(['cmake', str(cwd), param_py, '-DTEST=OFF', f'-DCMAKE_INSTALL_PREFIX:PATH={build_temp}/install']) + install_path = f"{build_temp}/install" if "AIDGE_INSTALL" not in os.environ else os.environ["AIDGE_INSTALL"] + + self.spawn(['cmake', str(cwd), param_py, '-DTEST=OFF', f'-DCMAKE_INSTALL_PREFIX:PATH={install_path}']) if not self.dry_run: self.spawn(['make', 'all', 'install', '-j', max_jobs]) os.chdir(str(cwd)) -- GitLab