From 04c01a23ec4bc9f8a2e08612a9092fe2d4d6777f Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI Date: Tue, 5 Oct 2021 16:32:04 +0200 Subject: [PATCH 1/2] replace conda install with mamaba install --- bob/devtools/data/gitlab-ci/noarch.yaml | 2 +- bob/devtools/data/gitlab-ci/single-package.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bob/devtools/data/gitlab-ci/noarch.yaml b/bob/devtools/data/gitlab-ci/noarch.yaml index 634324c..8d29a69 100644 --- a/bob/devtools/data/gitlab-ci/noarch.yaml +++ b/bob/devtools/data/gitlab-ci/noarch.yaml @@ -26,7 +26,7 @@ stages: - python3 bootstrap.py -vv channel base - source ${CONDA_ROOT}/etc/profile.d/conda.sh # for conda inspect during builds (on macos) - - conda install -n base conda-build + - mamba install -n base conda-build - conda activate base - bdt ci check -vv cache: diff --git a/bob/devtools/data/gitlab-ci/single-package.yaml b/bob/devtools/data/gitlab-ci/single-package.yaml index 94377a6..aebf064 100644 --- a/bob/devtools/data/gitlab-ci/single-package.yaml +++ b/bob/devtools/data/gitlab-ci/single-package.yaml @@ -26,7 +26,7 @@ stages: - python3 bootstrap.py -vv channel base - source ${CONDA_ROOT}/etc/profile.d/conda.sh # for conda inspect during builds (on macos) - - conda install -n base conda-build + - mamba install -n base conda-build - conda activate base - bdt ci check -vv cache: -- GitLab From b9b5ac9d7531b82a31c0d7dd045caa3f982b62b6 Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI Date: Tue, 5 Oct 2021 17:15:55 +0200 Subject: [PATCH 2/2] Add a check for python -m pip install line --- bob/devtools/scripts/ci.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bob/devtools/scripts/ci.py b/bob/devtools/scripts/ci.py index d0c1ca5..e7f5a26 100644 --- a/bob/devtools/scripts/ci.py +++ b/bob/devtools/scripts/ci.py @@ -1021,6 +1021,18 @@ def check(): f"pyprojecttoml" ) + # check if the package uses pip to install itself + path = "conda/meta.yaml" + if os.path.isfile(path): + with open(path) as f: + content = f.read() + if '- "{{ PYTHON }} -m pip install . -vv"' not in content: + raise RuntimeError( + f"""Could not find the pip install line inside the {path} file. +Please apply similar changes to the {path} file: +https://gitlab.idiap.ch/bob/bob.extension/-/merge_requests/133/diffs""" + ) + # if there is a pre-commit configuration file, run the tests path = ".pre-commit-config.yaml" if os.path.isfile(path): -- GitLab