Skip to content
Snippets Groups Projects
Commit e8029310 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Merge branch 'base-build' into 'master'

Let conda-build handle python variants

See merge request !159
parents 97adfaaf d3f96a02
No related branches found
No related tags found
1 merge request!159Let conda-build handle python variants
Pipeline #40114 passed
...@@ -23,9 +23,7 @@ stages: ...@@ -23,9 +23,7 @@ stages:
- source ${CONDA_ROOT}/etc/profile.d/conda.sh - source ${CONDA_ROOT}/etc/profile.d/conda.sh
- conda activate base - conda activate base
- bdt ci base-build -vv nopython.txt - bdt ci base-build -vv nopython.txt
- bdt ci base-build -vv --python=3.6 python.txt - bdt ci base-build -vv python.txt
- bdt ci base-build -vv --python=3.7 python.txt
- bdt ci base-build -vv --python=3.8 python.txt
- '[ "${CI_COMMIT_REF_NAME}" = "master" ] && bdt ci base-deploy -vv' - '[ "${CI_COMMIT_REF_NAME}" = "master" ] && bdt ci base-deploy -vv'
- bdt ci clean -vv - bdt ci clean -vv
cache: cache:
......
...@@ -344,13 +344,6 @@ Examples: ...@@ -344,13 +344,6 @@ Examples:
default="bob", default="bob",
help="Group of packages (gitlab namespace) this package belongs to", help="Group of packages (gitlab namespace) this package belongs to",
) )
@click.option(
"-p",
"--python",
multiple=True,
help='Versions of python in the format "x.y" we should build for. Pass '
"various times this option to build for multiple python versions",
)
@click.option( @click.option(
"-d", "-d",
"--dry-run/--no-dry-run", "--dry-run/--no-dry-run",
...@@ -361,7 +354,7 @@ Examples: ...@@ -361,7 +354,7 @@ Examples:
) )
@verbosity_option() @verbosity_option()
@bdt.raise_on_error @bdt.raise_on_error
def base_build(order, group, python, dry_run): def base_build(order, group, dry_run):
"""Builds base (dependence) packages. """Builds base (dependence) packages.
This command builds dependence packages (packages that are not This command builds dependence packages (packages that are not
...@@ -391,21 +384,13 @@ def base_build(order, group, python, dry_run): ...@@ -391,21 +384,13 @@ def base_build(order, group, python, dry_run):
recipes = load_order_file(order) recipes = load_order_file(order)
import itertools
from .. import bootstrap from .. import bootstrap
from ..build import base_build as _build from ..build import base_build as _build
# combine all versions of python with recipes for k, recipe in enumerate(recipes):
if python:
recipes = list(itertools.product(python, recipes))
else:
recipes = list(itertools.product([None], recipes))
for k, (pyver, recipe) in enumerate(recipes):
echo_normal("\n" + (80 * "=")) echo_normal("\n" + (80 * "="))
pytext = "for python-%s " % pyver if pyver is not None else ""
echo_normal( echo_normal(
'Building "%s" %s(%d/%d)' % (recipe, pytext, k + 1, len(recipes)) 'Building "%s" (%d/%d)' % (recipe, k + 1, len(recipes))
) )
echo_normal((80 * "=") + "\n") echo_normal((80 * "=") + "\n")
if not os.path.exists(os.path.join(recipe, "meta.yaml")): if not os.path.exists(os.path.join(recipe, "meta.yaml")):
...@@ -425,7 +410,7 @@ def base_build(order, group, python, dry_run): ...@@ -425,7 +410,7 @@ def base_build(order, group, python, dry_run):
group=group, group=group,
recipe_dir=recipe, recipe_dir=recipe,
conda_build_config=variants_file, conda_build_config=variants_file,
python_version=pyver, python_version=None,
condarc_options=condarc_options, condarc_options=condarc_options,
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment