Skip to content
Snippets Groups Projects
Commit 9692ff11 authored by Christophe Guillon's avatar Christophe Guillon
Browse files

[Setup] Allow empty AIDGE_BUILD_GEN type

If AIDGE_BUILD_GEN= is in environment the default build backend
is used.
parent ac291c3f
No related branches found
No related tags found
2 merge requests!212Version 0.3.0,!154[Setup] Add support for development install
...@@ -41,27 +41,23 @@ class CMakeBuild(build_ext): ...@@ -41,27 +41,23 @@ class CMakeBuild(build_ext):
os.chdir(str(build_temp)) os.chdir(str(build_temp))
compile_type = ( compile_type = os.environ.get("AIDGE_PYTHON_BUILD_TYPE", "Release")
"Release"
if "AIDGE_PYTHON_BUILD_TYPE" not in os.environ
else os.environ["AIDGE_PYTHON_BUILD_TYPE"]
)
install_path = ( install_path = (
os.path.join(sys.prefix, "lib", "libAidge") os.path.join(sys.prefix, "lib", "libAidge")
if "AIDGE_INSTALL" not in os.environ if "AIDGE_INSTALL" not in os.environ
else os.environ["AIDGE_INSTALL"] else os.environ["AIDGE_INSTALL"]
) )
build_gen = os.environ.get("AIDGE_BUILD_GEN", "")
build_gen = ( build_gen_opts = (
["-G", os.environ["AIDGE_BUILD_GEN"]] ["-G", build_gen]
if "AIDGE_BUILD_GEN" in os.environ if build_gen
else [] else []
) )
self.spawn( self.spawn(
[ [
"cmake", "cmake",
*build_gen, *build_gen_opts,
str(cwd), str(cwd),
"-DTEST=OFF", "-DTEST=OFF",
f"-DCMAKE_INSTALL_PREFIX:PATH={install_path}", f"-DCMAKE_INSTALL_PREFIX:PATH={install_path}",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment