Max Howell 2023-07-28 13:01:17 -04:00 committed by GitHub
parent 0f359252df
commit 9243322d5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,21 @@
# fit & finish
* pkgs are installed to `~/.conda/pkgs`
# tips
* `conda` requires a shell hook to work, however this doesnt have to be
permanent you can call the following in a terminal instead:
```sh
source <(conda shell.$(basename $SHELL) hook)
```
> There is no provided way to unload these hooks
# prospects
* conda could be patched to use tea to install python and potentially other
such kinds of dependencies

View file

@ -0,0 +1,22 @@
diff --git a/conda/base/context.py b/conda/base/context.py
index 5d8d179..dfa8da4 100644
--- a/conda/base/context.py
+++ b/conda/base/context.py
@@ -119,7 +119,7 @@ def mockable_context_envs_dirs(root_writable, root_prefix, _envs_dirs):
else:
fixed_dirs = [
join("~", ".conda", "envs"),
- join(root_prefix, "envs"),
+ # join(root_prefix, "envs"),
]
if on_win:
fixed_dirs.append(join(user_data_dir(APP_NAME, APP_NAME), "envs"))
@@ -665,7 +665,7 @@ class Context(Configuration):
else:
cache_dir_name = "pkgs32" if context.force_32bit else "pkgs"
fixed_dirs = (
- self.root_prefix,
+ # self.root_prefix,
join("~", ".conda"),
)
if on_win:

View file

@ -0,0 +1,43 @@
# this is what docs.conda.io refers to as `miniconda`
distributable:
url: https://github.com/conda/conda/archive/refs/tags/{{version.tag}}.tar.gz
strip-components: 1
versions:
github: conda/conda
dependencies:
python.org: ~3.11
build:
dependencies:
tea.xyz/gx/cc: '*'
gnu.org/patch: '*'
script:
# stops conda from installing to our versioned prefix by default
- patch -p1 < props/context.py.diff
- python-venv.sh {{prefix}}/bin/conda
# we desire to provide a conda that doesnt require you to force it into
# your shellrc this command modifies the installation to prevent it
# erroring so we have to do prior to pkging it
- '{{prefix}}/bin/conda init'
provides:
- bin/conda
test:
- conda --version | grep {{version}}
- |
source /dev/stdin <<<"$(conda shell.bash hook)"
conda create --yes --name snowflakes biopython
conda activate snowflakes
conda info --envs | grep snowflakes
conda deactivate
# check env has been restored
- |
if ! conda info --envs | grep snowflakes; then
exit 1
fi