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
fsl-ci-rules
Commits
c048be79
Commit
c048be79
authored
Nov 12, 2020
by
Paul McCarthy
🚵
Browse files
BF: pop no default, flush print
parent
29b41ca9
Changes
2
Hide whitespace changes
Inline
Side-by-side
scripts/build_conda_package.py
View file @
c048be79
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
import
os
import
os
import
sys
import
sys
from
fsl_ci_utils
import
sprun
,
tempdir
from
fsl_ci_utils
import
sprun
,
tempdir
,
fprint
def
pre_build_recipe
(
url
,
ref
,
output_dir
,
*
channels
):
def
pre_build_recipe
(
url
,
ref
,
output_dir
,
*
channels
):
...
@@ -29,7 +29,7 @@ def build_recipe(recipe_dir, ref, output_dir, *channels):
...
@@ -29,7 +29,7 @@ def build_recipe(recipe_dir, ref, output_dir, *channels):
env
=
dict
(
os
.
environ
)
env
=
dict
(
os
.
environ
)
if
ref
==
''
:
if
ref
==
''
:
env
.
pop
(
'FSLCONDA_REVISION'
)
env
.
pop
(
'FSLCONDA_REVISION'
,
None
)
else
:
else
:
env
[
'FSLCONDA_REVISION'
]
=
ref
env
[
'FSLCONDA_REVISION'
]
=
ref
...
@@ -89,14 +89,14 @@ def main():
...
@@ -89,14 +89,14 @@ def main():
sprun
(
f
'conda index
{
local_channel
}
'
)
sprun
(
f
'conda index
{
local_channel
}
'
)
sprun
(
'conda install -y -c conda-forge conda-build'
)
sprun
(
'conda install -y -c conda-forge conda-build'
)
print
(
'************************************'
)
f
print
(
'************************************'
)
print
(
f
'Building conda recipe for:
{
env
[
"CI_PROJECT_NAME"
]
}
'
)
f
print
(
f
'Building conda recipe for:
{
env
[
"CI_PROJECT_NAME"
]
}
'
)
print
(
f
'Recipe URL:
{
env
[
"CI_PROJECT_URL"
]
}
'
)
f
print
(
f
'Recipe URL:
{
env
[
"CI_PROJECT_URL"
]
}
'
)
print
(
f
'Pre-built packages:
{
prebuild
}
'
)
f
print
(
f
'Pre-built packages:
{
prebuild
}
'
)
print
(
'Revision (empty means to build release'
)
f
print
(
'Revision (empty means to build release'
)
print
(
f
' specified in meta.yaml):
{
project_ref
}
'
)
f
print
(
f
' specified in meta.yaml):
{
project_ref
}
'
)
print
(
f
'FSL conda channel URL:
{
channel_url
}
'
)
f
print
(
f
'FSL conda channel URL:
{
channel_url
}
'
)
print
(
'************************************'
)
f
print
(
'************************************'
)
build_recipe
(
'.'
,
project_ref
,
output_dir
,
local_channel
,
channel_url
)
build_recipe
(
'.'
,
project_ref
,
output_dir
,
local_channel
,
channel_url
)
...
...
utils/fsl_ci_utils/__init__.py
View file @
c048be79
...
@@ -16,6 +16,11 @@ import fsl_ci_utils.conda_api as api # noqa # pylint: disable=unused-import
...
@@ -16,6 +16,11 @@ import fsl_ci_utils.conda_api as api # noqa # pylint: disable=unused-import
import
fsl_ci_utils.conda
as
conda
# noqa # pylint: disable=unused-import
import
fsl_ci_utils.conda
as
conda
# noqa # pylint: disable=unused-import
def
fprint
(
*
args
,
**
kwargs
):
"""Print with flush=True. """
print
(
*
args
,
**
kwargs
,
flush
=
True
)
@
ctxlib
.
contextmanager
@
ctxlib
.
contextmanager
def
tempdir
():
def
tempdir
():
"""Context manager to create, and change into, a temporary directory, and
"""Context manager to create, and change into, a temporary directory, and
...
...
Write
Preview
Supports
Markdown
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