Skip to content

Commit

Permalink
conda-standalone always available as $PREFIX/_conda.exe
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Mar 25, 2022
1 parent 9fc8f95 commit 6d94530
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions constructor/header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ cd "$PREFIX"
unset PYTHON_SYSCONFIGDATA_NAME _CONDA_PYTHON_SYSCONFIGDATA_NAME

# the first binary payload: the standalone conda executable
CONDA_EXEC="$PREFIX/conda.exe"
CONDA_EXEC="$PREFIX/_conda.exe"
extract_range $boundary0 $boundary1 > "$CONDA_EXEC"
chmod +x "$CONDA_EXEC"

Expand Down Expand Up @@ -499,7 +499,6 @@ POSTCONDA="$PREFIX/postconda.tar.bz2"
"$CONDA_EXEC" constructor --prefix "$PREFIX" --extract-tarball < "$POSTCONDA" || exit 1
rm -f "$POSTCONDA"

rm -f $PREFIX/conda.exe
rm -f $PREFIX/pkgs/env.txt

rm -rf $PREFIX/install_tmp
Expand Down
3 changes: 1 addition & 2 deletions constructor/osx/post_extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PREFIX=$(cd "$PREFIX"; pwd)
export PREFIX
echo "PREFIX=$PREFIX"

CONDA_EXEC="$PREFIX/conda.exe"
CONDA_EXEC="$PREFIX/_conda.exe"
chmod +x "$CONDA_EXEC"

# Create a blank history file so conda thinks this is an existing env
Expand Down Expand Up @@ -39,7 +39,6 @@ fi
mv "$PREFIX/pkgs/conda-meta/history" "$PREFIX/conda-meta/history"

# Cleanup!
rm -f "$CONDA_EXEC"
rm -f "$PREFIX/env.txt"
find "$PREFIX/pkgs" -type d -empty -exec rmdir {} \; 2>/dev/null || :

Expand Down
4 changes: 2 additions & 2 deletions constructor/osxpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,15 @@ def create(info, verbose=False):
# See http://stackoverflow.com/a/11487658/161801 for how all this works.

# The main package contains the prepopulated package cache, the modified
# conda-meta metadata staged into pkgs/conda-meta, and conda.exe
# conda-meta metadata staged into pkgs/conda-meta, and _conda.exe
fresh_dir(PACKAGE_ROOT)
fresh_dir(SCRIPTS_DIR)
pkgs_dir = join(prefix, 'pkgs')
os.makedirs(pkgs_dir)
preconda.write_files(info, pkgs_dir)
for dist in info['_dists']:
os.link(join(CACHE_DIR, dist), join(pkgs_dir, dist))
shutil.copyfile(info['_conda_exe'], join(prefix, "conda.exe"))
shutil.copyfile(info['_conda_exe'], join(prefix, "_conda.exe"))
# This script checks to see if the install location already exists
move_script(join(OSX_DIR, 'preinstall.sh'), join(SCRIPTS_DIR, 'preinstall'), info)
# This script performs the full installation
Expand Down

0 comments on commit 6d94530

Please sign in to comment.