Skip to content

Commit

Permalink
Make firedrake-update handle archived repos
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjward committed Dec 6, 2024
1 parent d952afc commit bb0d8fd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/firedrake-install
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,19 @@ else:
if args.rebuild:
pip_uninstall("petsc4py")

# Handle archived repositories
archived_repos = [("PyOP2", "firedrake", "PyOP2"),
("tsfc", "firedrake+fiat", "tsfc"),
("FInAT", "fiat", "FInAT")]
for src_repo, dest_repo, pip_pkg_name in archived_repos:
archived_path = os.path.join(firedrake_env, "src", src_repo)
if os.path.exists(archived_path):
log.warning("%s has been moved into %s, renaming to %s_old and pip uninstalling.\n"
% (src_repo, dest_repo, src_repo))
pip_uninstall(pip_pkg_name)
new_path = os.path.join(firedrake_env, "src", "%s_old" % src_repo)
os.rename(archived_path, new_path)

# If there is a petsc package to remove, then we're an old installation which will need to rebuild PETSc.
update_petsc = pip_uninstall("petsc") or update_petsc

Expand Down

0 comments on commit bb0d8fd

Please sign in to comment.