diff --git a/build.py b/build.py index e558a41c..c77e4eed 100644 --- a/build.py +++ b/build.py @@ -37,7 +37,7 @@ class ExtensionBuilder(build_ext): try: out = subprocess.check_output(["cmake", "--version"]) except OSError: - raise RuntimeErrorPython_CORIOLISDIR( + raise RuntimeError( "CMake must be installed to build the following extensions: " + ", ".join(e.name for e in cmake_extensions) ) @@ -80,7 +80,11 @@ class ExtensionBuilder(build_ext): cmake_args += [f"-DCORIOLIS_USER_TOP={extdir}"] cmake_args += [f"-DPOETRY=1"] cmake_args += [f"-DWITH_QT5=1"] - + cmake_args += [f"-DCMAKE_BUILD_RPATH_USE_ORIGIN=1"] + cmake_args += ["-DCMAKE_SKIP_BUILD_RPATH=FALSE"] + cmake_args += ["-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"] + cmake_args += ["-DCMAKE_INSTALL_RPATH=\${ORIGIN}/lib"] + cmake_args += ["-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"] subprocess.check_call(["cmake", "--debug-find", "--trace-redirect=build.cmake.trace", "--trace-expand", ext.sourcedir] + cmake_args, cwd=build_dir, env=env) subprocess.check_call(["cmake", "--build", "."] + build_args, cwd=build_dir) @@ -89,25 +93,25 @@ class ExtensionBuilder(build_ext): def build(setup_kwargs: Dict[str, Any]) -> None: cmake_modules = [ - CMakeExtension("Coriolis.coloquinte", sourcedir="coloquinte"), - CMakeExtension("Coriolis.hurricane", sourcedir="hurricane"), - CMakeExtension("Coriolis.crlcore", sourcedir="crlcore"), - CMakeExtension("Coriolis.flute", sourcedir="flute"), - CMakeExtension("Coriolis.etesian", sourcedir="etesian"), - CMakeExtension("Coriolis.anabatic", sourcedir="anabatic"), - CMakeExtension("Coriolis.katana", sourcedir="katana"), - CMakeExtension("Coriolis.equinox", sourcedir="equinox"), - CMakeExtension("Coriolis.solstice", sourcedir="solstice"), - CMakeExtension("Coriolis.oroshi", sourcedir="oroshi"), - CMakeExtension("Coriolis.bora", sourcedir="bora"), - CMakeExtension("Coriolis.karakaze", sourcedir="karakaze"), - #CMakeExtension("Coriolis.knik", sourcedir="knik"), - #CMakeExtension("Coriolis.unicorn", sourcedir="unicorn"), - CMakeExtension("Coriolis.tutorial", sourcedir="tutorial"), - CMakeExtension("Coriolis.cumulus", sourcedir="cumulus"), - CMakeExtension("Coriolis.stratus1", sourcedir="stratus1"), - CMakeExtension("Coriolis.documentation", sourcedir="documentation"), - CMakeExtension("Coriolis.unittests", sourcedir="unittests") + CMakeExtension("coloquinte", sourcedir="coloquinte"), + CMakeExtension("Hurricane", sourcedir="hurricane"), + CMakeExtension("crlcore", sourcedir="crlcore"), + CMakeExtension("flute", sourcedir="flute"), + CMakeExtension("etesian", sourcedir="etesian"), + CMakeExtension("anabatic", sourcedir="anabatic"), + CMakeExtension("katana", sourcedir="katana"), + CMakeExtension("equinox", sourcedir="equinox"), + CMakeExtension("solstice", sourcedir="solstice"), + CMakeExtension("oroshi", sourcedir="oroshi"), + CMakeExtension("bora", sourcedir="bora"), + CMakeExtension("karakaze", sourcedir="karakaze"), + #CMakeExtension("knik", sourcedir="knik"), + #CMakeExtension("unicorn", sourcedir="unicorn"), + CMakeExtension("tutorial", sourcedir="tutorial"), + CMakeExtension("cumulus", sourcedir="cumulus"), + CMakeExtension("stratus1", sourcedir="stratus1"), + CMakeExtension("documentation", sourcedir="documentation"), + CMakeExtension("unittests", sourcedir="unittests") ] ext_modules = cmake_modules