2023-07-28 20:01:17 +03:00
|
|
|
|
# this is what docs.conda.io refers to as `miniconda`
|
|
|
|
|
|
2024-02-01 20:09:57 +03:00
|
|
|
|
# conda requires conda to build conda since 23.11. so, we use miniconda's installer script
|
|
|
|
|
# into a venv
|
|
|
|
|
|
|
|
|
|
warnings:
|
|
|
|
|
- vendored
|
2023-07-28 20:01:17 +03:00
|
|
|
|
|
|
|
|
|
versions:
|
2024-02-01 20:09:57 +03:00
|
|
|
|
url: https://repo.anaconda.com/miniconda/
|
2024-04-25 23:29:39 +03:00
|
|
|
|
match: /Miniconda3-py311_\d+\.\d+\.\d+-\d+-MacOSX-arm64.sh/
|
2024-02-01 20:09:57 +03:00
|
|
|
|
strip:
|
|
|
|
|
- /Miniconda3-py311_/
|
2024-04-25 23:29:39 +03:00
|
|
|
|
- /-\d+-MacOSX-arm64.sh/
|
2023-07-28 20:01:17 +03:00
|
|
|
|
|
|
|
|
|
dependencies:
|
2024-02-01 22:18:32 +03:00
|
|
|
|
pkgx.sh: ^1
|
2024-04-25 23:52:48 +03:00
|
|
|
|
openssl.org: ^1.1
|
2024-02-01 20:09:57 +03:00
|
|
|
|
|
2024-04-25 23:29:39 +03:00
|
|
|
|
runtime:
|
|
|
|
|
env:
|
|
|
|
|
CRYPTOGRAPHY_OPENSSL_NO_LEGACY: 1
|
|
|
|
|
|
2023-07-28 20:01:17 +03:00
|
|
|
|
build:
|
|
|
|
|
dependencies:
|
2024-02-01 23:26:10 +03:00
|
|
|
|
# https://docs.conda.io/projects/miniconda/en/latest/#latest-miniconda-installer-links
|
|
|
|
|
python.org: =3.11.5
|
2023-07-28 20:01:17 +03:00
|
|
|
|
gnu.org/patch: '*'
|
2024-02-01 20:09:57 +03:00
|
|
|
|
curl.se: '*'
|
2023-07-28 20:01:17 +03:00
|
|
|
|
script:
|
2024-02-01 20:09:57 +03:00
|
|
|
|
- bkpyvenv stage {{prefix}} {{version}}
|
2024-04-25 23:29:39 +03:00
|
|
|
|
# FIXME: we need a way to handle suffix versions
|
|
|
|
|
- |
|
|
|
|
|
for v in 9 8 7 6 5 4 3 2 1 0; do
|
|
|
|
|
if curl -fLS https://repo.anaconda.com/miniconda/Miniconda3-py311_{{version}}-$v-${SUFFIX}.sh -o miniconda.sh; then
|
|
|
|
|
break
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
test -f miniconda.sh
|
2024-02-01 20:09:57 +03:00
|
|
|
|
- chmod +x miniconda.sh
|
|
|
|
|
- ./miniconda.sh -b -f -s -p {{prefix}}/venv
|
|
|
|
|
|
2023-07-28 20:01:17 +03:00
|
|
|
|
# stops conda from installing to our versioned prefix by default
|
2024-02-01 20:09:57 +03:00
|
|
|
|
- run: |
|
|
|
|
|
cd conda-{{version}}-*/lib/python3.11/site-packages
|
|
|
|
|
patch -p1 < $SRCROOT/props/context.py.diff
|
|
|
|
|
working-directory: ${{prefix}}/venv/pkgs
|
|
|
|
|
- run: patch -p1 < $SRCROOT/props/context.py.diff
|
|
|
|
|
working-directory: ${{prefix}}/venv/lib/python3.11/site-packages
|
2023-07-28 20:01:17 +03:00
|
|
|
|
|
2024-02-01 22:18:32 +03:00
|
|
|
|
- bkpyvenv seal {{prefix}} conda
|
|
|
|
|
|
2023-07-28 20:01:17 +03:00
|
|
|
|
# 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'
|
2024-04-25 23:52:48 +03:00
|
|
|
|
|
|
|
|
|
# put the conda libs in a findable path
|
|
|
|
|
- run: ln -s venv/lib lib
|
|
|
|
|
working-directory: ${{prefix}}
|
2024-02-01 20:09:57 +03:00
|
|
|
|
env:
|
|
|
|
|
darwin/aarch64:
|
|
|
|
|
SUFFIX: MacOSX-arm64
|
|
|
|
|
darwin/x86-64:
|
|
|
|
|
SUFFIX: MacOSX-x86_64
|
|
|
|
|
linux/x86-64:
|
|
|
|
|
SUFFIX: Linux-x86_64
|
|
|
|
|
linux/aarch64:
|
|
|
|
|
SUFFIX: Linux-aarch64 # not arm64. weird.
|
2023-07-28 20:01:17 +03:00
|
|
|
|
|
|
|
|
|
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
|