mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 16:35:07 +03:00
e48bc639f1
hopefully. there's what looks like an api issue in `threading` that only appears on darwin-x86-64...
71 lines
2 KiB
YAML
71 lines
2 KiB
YAML
# this is what docs.conda.io refers to as `miniconda`
|
||
|
||
# conda requires conda to build conda since 23.11. so, we use miniconda's installer script
|
||
# into a venv
|
||
|
||
warnings:
|
||
- vendored
|
||
|
||
versions:
|
||
url: https://repo.anaconda.com/miniconda/
|
||
match: /Miniconda3-py311_\d+\.\d+\.\d+-1-MacOSX-arm64.sh/
|
||
strip:
|
||
- /Miniconda3-py311_/
|
||
- /-1-MacOSX-arm64.sh/
|
||
|
||
dependencies:
|
||
pkgx.sh: ^1
|
||
|
||
build:
|
||
dependencies:
|
||
# https://docs.conda.io/projects/miniconda/en/latest/#latest-miniconda-installer-links
|
||
python.org: =3.11.5
|
||
gnu.org/patch: '*'
|
||
curl.se: '*'
|
||
script:
|
||
- bkpyvenv stage {{prefix}} {{version}}
|
||
- curl -LS https://repo.anaconda.com/miniconda/Miniconda3-py311_{{version}}-1-${SUFFIX}.sh -o miniconda.sh
|
||
- chmod +x miniconda.sh
|
||
- ./miniconda.sh -b -f -s -p {{prefix}}/venv
|
||
|
||
# stops conda from installing to our versioned prefix by default
|
||
- 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
|
||
|
||
- bkpyvenv seal {{prefix}} 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'
|
||
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.
|
||
|
||
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
|