mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
fix(conda) (#5073)
* fix(conda) condas >=23.11 require a conda-solver package that's only available in conda (so pip fails to find it). this uses miniconda to install conda into our venv. and it seems to work! closes #3897 closes #5072 * haha. well, let's use the correct platform-specific installer.
This commit is contained in:
parent
5898cdcb9b
commit
94970ed3d0
1 changed files with 36 additions and 6 deletions
|
@ -1,27 +1,57 @@
|
||||||
# this is what docs.conda.io refers to as `miniconda`
|
# this is what docs.conda.io refers to as `miniconda`
|
||||||
|
|
||||||
distributable:
|
# conda requires conda to build conda since 23.11. so, we use miniconda's installer script
|
||||||
url: https://github.com/conda/conda/archive/refs/tags/{{version.tag}}.tar.gz
|
# into a venv
|
||||||
strip-components: 1
|
|
||||||
|
warnings:
|
||||||
|
- vendored
|
||||||
|
|
||||||
versions:
|
versions:
|
||||||
github: conda/conda
|
url: https://repo.anaconda.com/miniconda/
|
||||||
|
match: /Miniconda3-py311_\d+\.\d+\.\d+-1-MacOSX-arm64.sh/
|
||||||
|
strip:
|
||||||
|
- /Miniconda3-py311_/
|
||||||
|
- /-1-MacOSX-arm64.sh/
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
python.org: ~3.11
|
python.org: ~3.11
|
||||||
|
|
||||||
|
runtime:
|
||||||
|
env:
|
||||||
|
PYTHONPATH: '{{prefix}}/lib/python3.11/site-packages:$PYTHONPATH'
|
||||||
|
|
||||||
build:
|
build:
|
||||||
dependencies:
|
dependencies:
|
||||||
gnu.org/patch: '*'
|
gnu.org/patch: '*'
|
||||||
|
curl.se: '*'
|
||||||
script:
|
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
|
# stops conda from installing to our versioned prefix by default
|
||||||
- patch -p1 < props/context.py.diff
|
- run: |
|
||||||
- python-venv.sh {{prefix}}/bin/conda
|
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
|
||||||
|
|
||||||
# we desire to provide a conda that doesn’t require you to force it into
|
# 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
|
# your shellrc this command modifies the installation to prevent it
|
||||||
# erroring so we have to do prior to pkging it
|
# erroring so we have to do prior to pkging it
|
||||||
|
- bkpyvenv seal {{prefix}} conda
|
||||||
- '{{prefix}}/bin/conda init'
|
- '{{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:
|
provides:
|
||||||
- bin/conda
|
- bin/conda
|
||||||
|
|
Loading…
Reference in a new issue