-
Notifications
You must be signed in to change notification settings - Fork 312
/
Copy pathconda.yaml
191 lines (180 loc) · 5.51 KB
/
conda.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# Creates a base environment at /usr, so you need to change the root_prefix in config and explictly create a base env,
# instead you may use the conda-base package in wolfi-dev
package:
name: conda
version: "25.1.1"
epoch: 0
description: "A system-level, binary package and environment manager running on all major operating systems and platforms."
copyright:
- license: BSD-3-Clause
dependencies:
provider-priority: 0
vars:
pypi-package: conda
import: conda
test-commands: |
conda --version
conda info
conda init
conda create --quiet -n foo
conda install --quiet -n foo numpy
conda install --quiet -n foo --solver=classic requests
conda --help
data:
- name: py-versions
items:
# As of 24.11.1, 3.13 fails tests: https://github.com/conda/conda/issues/14439
3.10: "310"
3.11: "311"
3.12: "312"
environment:
contents:
packages:
- bash
- busybox
- ca-certificates-bundle
- py3-supported-build-base
- py3-supported-charset-normalizer
- py3-supported-conda-package-handling
- py3-supported-conda-package-streaming
- py3-supported-hatch
- py3-supported-hatch-vcs
- py3-supported-hatchling
- py3-supported-idna
- py3-supported-libmambapy
- py3-supported-pycosat
- py3-supported-requests
- py3-supported-urllib3
- py3-supported-wheel
- py3-supported-zstandard
- wget
- wolfi-base
pipeline:
- uses: git-checkout
with:
repository: https://github.com/conda/conda
tag: ${{package.version}}
expected-commit: 561fbf62dff075026addfb3d4820873f08464ca4
subpackages:
- range: py-versions
name: py${{range.key}}-${{vars.pypi-package}}
description: python${{range.key}} version of ${{vars.pypi-package}}
dependencies:
runtime:
- py${{range.key}}-archspec
- py${{range.key}}-boltons
- py${{range.key}}-conda-libmamba-solver
- py${{range.key}}-conda-package-handling
- py${{range.key}}-conda-package-streaming
- py${{range.key}}-libmambapy
- py${{range.key}}-packaging
- py${{range.key}}-platformdirs
- py${{range.key}}-pluggy
- py${{range.key}}-pycosat
- py${{range.key}}-requests
- py${{range.key}}-ruamel-yaml
- py${{range.key}}-tqdm
pipeline:
- runs: |
# We don't use this dir until further down, but py/pip-build-install
# will fail if a parameter to its `prevent-inclusion:` does not exist
mkdir -p ./cleanup
- uses: py/pip-build-install
with:
python: python${{range.key}}
prevent-inclusion: cleanup melange-out
- name: "move usr/bin executables for -bin"
runs: |
mkdir -p ./cleanup/${{range.key}}/
mv ${{targets.contextdir}}/usr/bin ./cleanup/${{range.key}}/
- uses: strip
test:
pipeline:
- uses: python/import
with:
python: python${{range.key}}
import: ${{vars.import}}
- range: py-versions
name: py${{range.key}}-${{vars.pypi-package}}-bin
description: Executable binaries for ${{vars.pypi-package}} installed for python${{range.key}}
dependencies:
runtime:
- py${{range.key}}-${{vars.pypi-package}}
# running 'conda init' as is done in the test will rewrite /usr/bin/conda
# and do so with a shbang of '/usr/bin/python'.
- python-${{range.key}}
provides:
- conda
- py-${{vars.pypi-package}}
provider-priority: ${{range.value}}
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/usr/
mv ./cleanup/${{range.key}}/bin ${{targets.contextdir}}/usr/
test:
pipeline:
- runs: ${{vars.test-commands}}
- name: py3-supported-${{vars.pypi-package}}
description: meta package providing ${{vars.pypi-package}} for supported python versions.
dependencies:
runtime:
- py3.10-${{vars.pypi-package}}
- py3.11-${{vars.pypi-package}}
- py3.12-${{vars.pypi-package}}
test:
pipeline:
- uses: python/import
with:
python: python3.10
import: ${{vars.import}}
- uses: python/import
with:
python: python3.11
import: ${{vars.import}}
- uses: python/import
with:
python: python3.12
import: ${{vars.import}}
- name: ${{package.name}}-init
description: Initializes conda
dependencies:
runtime:
- bash
- conda
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/etc/profile.d
install -Dm755 init.sh ${{targets.subpkgdir}}/etc/profile.d/${{package.name}}-init.sh
test:
environment:
contents:
packages:
- conda-base
pipeline:
- runs: |
source /etc/profile.d/conda-init.sh
conda install -y conda
- name: ${{package.name}}-wrapper
description: A wrapper that initializes conda before use
dependencies:
runtime:
- ${{package.name}}-init
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/usr/bin
install -Dm755 wrapper.sh ${{targets.subpkgdir}}/usr/bin/${{package.name}}-wrapper
test:
environment:
contents:
packages:
- conda-base
pipeline:
- runs: |
conda-wrapper install -y conda
update:
enabled: true
github:
identifier: conda/conda
test:
pipeline:
- runs: ${{vars.test-commands}}