Skip to content

Commit 7a1969a

Browse files
authored
Merge branch 'main' into issue_1181_more_force_conda_forge
2 parents c45bb79 + 93c086b commit 7a1969a

3 files changed

Lines changed: 15 additions & 8 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",

support/setup/environment.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ detect_environments() {
3030
fi
3131

3232
if [ "a${CONDA_DEFAULT_ENV}" != "a" ] ; then
33-
ENV_TYPE="conda"
34-
ENV_NAME="${CONDA_DEFAULT_ENV}"
33+
if [ "a${CONDA_DEFAULT_ENV}" != "abase" ] ; then
34+
ENV_TYPE="conda"
35+
ENV_NAME="${CONDA_DEFAULT_ENV}"
36+
fi
3537
fi
3638
}
3739

support/setup/help.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ print_environment_step() {
104104
105105
To install any packages, you need to create and activate a Conda environment
106106
or a Python virtualenv. If you have an environment into which you'd like to
107-
install AMUSE, you should activate it now. To create a new Conda environment,
108-
use
107+
install AMUSE, then you should activate it now.
108+
109+
To create a new Conda environment, use
109110
110111
conda create --channel conda-forge --override-channels -n Amuse-env
111112
@@ -115,6 +116,10 @@ Then you activate it using
115116
116117
You can name the environment anything you like instead of my-amuse-env.
117118
119+
Note that installing packages other than conda itself in the (base) environment
120+
is not supported by conda, and this installer will refuse to do so. Please make
121+
a specific conda environment for your project as described above.
122+
118123
To create a Python virtualenv, use
119124
120125
python3 -m venv venv

0 commit comments

Comments
 (0)