Skip to content

Commit 202161f

Browse files
authored
Merge pull request #1233 from LourensVeen/issue_1185_amusifier_incorrect_symlink
Fix incorrect symlink generation in amusifier
2 parents ddc5dcd + 2d071e1 commit 202161f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/amuse/rfi/tools/create_dir.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,13 @@ def _make_support(code_dir: Path, language: str, variables: Dict[str, str]) -> N
8484
for tmpl, path in tmpls_paths.items():
8585
_instantiate_template(tmpl, support_dir / path.format(**variables), variables)
8686

87-
# TODO: this needs to be updated when we move the codes out of community/
88-
shared_base = code_dir / ".." / ".." / ".." / "support" / "shared"
87+
shared_base = code_dir / ".." / ".." / "support" / "shared"
8988
shared_dir = support_dir / "shared"
9089
if shared_base.exists():
9190
# We're probably inside the AMUSE tree, so we make a symlink like for the other
9291
# embedded codes. This avoids having to update many copies of e.g. a broken m4
9392
# macro.
94-
shared_dir.symlink_to(shared_base)
93+
shared_dir.symlink_to(Path("..") / ".." / ".." / "support" / "shared")
9594
else:
9695
shared_dir.mkdir()
9796
for src, dst in _files_support.items():
@@ -125,7 +124,8 @@ def _make_packages(code_dir: Path, code: str, variables: Dict[str, str]) -> None
125124
def make_package(pkg_type: str, suffix: str) -> None:
126125
pkg_dir = code_dir / "packages" / f"amuse-{code}{suffix}"
127126
pkg_dir.mkdir()
128-
(pkg_dir / code).symlink_to("../..", True)
127+
module = 'amuse_' + code
128+
(pkg_dir / module).symlink_to("../..", True)
129129

130130
_instantiate_template(
131131
"amuse-code.amuse_deps",

0 commit comments

Comments
 (0)