Skip to content

Commit

Permalink
Correct check for existing Calculix
Browse files Browse the repository at this point in the history
  • Loading branch information
chennes committed Jul 12, 2024
1 parent d58a526 commit d77c54a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compile_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,11 +1037,11 @@ def build_opencamlib(self, _: None):
def build_calculix(self, _: None):
"""Cannot currently build Calculix (it's in Fortran, and we only support MSVC toolchain right now). Extract
the relevant files from the downloaded zipfile and copy them"""
path_to_ccx_bin = os.path.join(os.getcwd(), "CL35-win64", "bin", "ccx", "218")
if self.skip_existing:
if os.path.exists(path_to_ccx_bin):
if os.path.exists(os.path.join(self.install_dir, "bin", "ccx.exe")):
print(" Not rebuilding Calculix, it is already in the LibPack")
return
path_to_ccx_bin = os.path.join(os.getcwd(), "CL35-win64", "bin", "ccx", "218")
if not os.path.exists(path_to_ccx_bin):
raise RuntimeError("Could not locate Calculix")
shutil.copytree(path_to_ccx_bin, os.path.join(self.install_dir, "bin"), dirs_exist_ok=True)
Expand Down

0 comments on commit d77c54a

Please sign in to comment.