Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
conda
manifest-rules
Commits
0054e0a6
Commit
0054e0a6
authored
Oct 19, 2021
by
Paul McCarthy
🚵
Browse files
RF: Read base_packages list from release.yml, and add to manifest files
parent
adae3828
Changes
3
Hide whitespace changes
Inline
Side-by-side
manifest_rules/__init__.py
View file @
0054e0a6
#!/usr/bin/env python
__version__
=
'0.
4.11
'
__version__
=
'0.
5.0
'
manifest_rules/generate_manifest_file.py
View file @
0054e0a6
...
...
@@ -167,9 +167,10 @@ def generate_version_section(version,
version
,
platform
,
cuda
=
parse_environment_file_name
(
envfile
)
build
=
{
'platform'
:
platform
,
'environment'
:
url
,
'sha256'
:
checksum
'platform'
:
platform
,
'environment'
:
url
,
'sha256'
:
checksum
,
'base_packages'
:
release_info
[
'base_packages'
]
}
if
cuda
is
not
None
:
build
[
'cuda'
]
=
cuda
...
...
manifest_rules/test_environment.py
View file @
0054e0a6
...
...
@@ -67,6 +67,7 @@ def full_test(envfile, release_info):
platform
=
parse_environment_file_name
(
envfile
)[
1
]
miniconda_url
=
release_info
[
'miniconda'
][
platform
]
base_packages
=
release_info
[
'base_packages'
]
download_file
(
miniconda_url
,
'miniconda.sh'
)
...
...
@@ -74,21 +75,24 @@ def full_test(envfile, release_info):
preprocess_environment
(
envfile
,
'fsl'
,
True
)
base
ver
=
None
base
pkgs
=
{}
with
open
(
envfile
,
'rt'
)
as
f
:
for
line
in
f
:
if
line
.
strip
().
startswith
(
'- fsl-base'
):
basever
=
line
.
strip
().
split
()[
2
]
break
for
pkg
in
base_packages
:
if
line
.
strip
().
startswith
(
f
'-
{
pkg
}
'
):
pkgver
=
line
.
strip
().
split
(
maxsplit
=
2
)[
2
]
basepkgs
[
pkg
]
=
pkgver
.
replace
(
' '
,
'='
)
env
=
os
.
environ
.
copy
()
env
=
os
.
environ
.
copy
()
env
[
'CONDARC'
]
=
op
.
abspath
(
op
.
join
(
'fsl'
,
'condarc'
))
if
basever
is
None
:
if
len
(
basepkgs
)
==
0
:
env_out
=
''
else
:
env_out
=
sprun
(
f
'./fsl/bin/conda install -y '
f
'-n base fsl-base=
{
basever
}
'
)
basepkgs
=
[
f
'
{
pkg
}
=
{
ver
}
'
for
pkg
,
ver
in
basepkgs
.
items
()]
basepkgs
=
' '
.
join
(
basepkgs
)
env_out
=
sprun
(
f
'./fsl/bin/conda install -y -n base
{
basepkgs
}
'
,
env
=
env
)
env_out
+=
sprun
(
f
'./fsl/bin/conda env update -n base -f
{
envfile
}
'
,
env
=
env
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment