mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
+conda (miniconda) (#2683)
Refs * https://github.com/teaxyz/pantry/pull/388 * https://github.com/teaxyz/pantry/issues/6
This commit is contained in:
parent
0f359252df
commit
9243322d5b
21
projects/conda.org/README.md
Normal file
21
projects/conda.org/README.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# fit & finish
|
||||
|
||||
* pkgs are installed to `~/.conda/pkgs`
|
||||
|
||||
|
||||
# tips
|
||||
|
||||
* `conda` requires a shell hook to work, however this doesn’t 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
|
22
projects/conda.org/context.py.diff
Normal file
22
projects/conda.org/context.py.diff
Normal 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:
|
43
projects/conda.org/package.yml
Normal file
43
projects/conda.org/package.yml
Normal 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 doesn’t 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
|
Loading…
Reference in a new issue