Skip to content

Commit 5930ee3

Browse files
committed
Update RC labels of Conda packages according to version number
If alpha or RC, then deduce the label RC. Otherwise, use the default (main) label. Note: in meta.yaml the RC label is hard-coded for the current alpha release, as there is no documented way of parameterizing the label without dynamically modifying the file.
1 parent ad74fa4 commit 5930ee3

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.github/workflows/conda.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ jobs:
103103
echo "KHIOPS_CORE_VERSION=$KHIOPS_CORE_VERSION" >> "$GITHUB_ENV"
104104
- name: Install the Khiops Conda package
105105
run: |
106-
conda install khiops-core=$KHIOPS_CORE_VERSION
106+
if [[ $(echo ${KHIOPS_CORE_VERSION} | grep -E ".*-(a|rc)\.[0-9]+") ]]; then RC_LABEL="conda-forge/label/rc::"; else RC_LABEL=""; fi \
107+
conda install ${RC_LABEL}khiops-core=$KHIOPS_CORE_VERSION
107108
conda install --channel ./khiops-conda/ khiops
108109
- name: Test Khiops Installation Status
109110
run: kh-status

packaging/conda/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ requirements:
2626
- python
2727
run:
2828
- python
29-
- khiops-core =11.0.0a.0
29+
- conda-forge/label/rc::khiops-core =11.0.0a.0
3030
- pandas >=0.25.3
3131
- scikit-learn >=0.22.2
3232
run_constrained:

packaging/docker/khiopspydev/Dockerfile.rocky

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@ RUN true \
7171
ARG PYTHON_VERSIONS
7272
RUN true \
7373
&& export CONDA="/root/miniforge3/bin/conda" \
74+
&& if [[ $(echo ${KHIOPS_REVISION} | grep -E ".*-(a|rc)\.[0-9]+") ]]; then export RC_LABEL="conda-forge/label/rc::"; else export RC_LABEL=""; fi \
7475
&& /bin/bash -c 'for version in ${PYTHON_VERSIONS}; \
7576
do \
7677
CONDA_ENVS="py${version} py${version}_conda"; \
7778
for CONDA_ENV in $CONDA_ENVS; \
7879
do \
7980
$CONDA create -y -n $CONDA_ENV python=${version}; \
8081
done; \
81-
$CONDA install -y -n py${version}_conda khiops-core=$(echo ${KHIOPS_REVISION} | tr -d "-") ; \
82+
$CONDA install -y -n py${version}_conda ${RC_LABEL}khiops-core=$(echo ${KHIOPS_REVISION} | tr -d "-") ; \
8283
done' \
8384
&& true
8485

packaging/docker/khiopspydev/Dockerfile.ubuntu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ ARG KHIOPS_GCS_DRIVER_REVISION
4444
ARG KHIOPS_S3_DRIVER_REVISION
4545
RUN true \
4646
&& export CONDA="/root/miniforge3/bin/conda" \
47+
&& if [[ $(echo ${KHIOPS_REVISION} | grep -E ".*-(a|rc)\.[0-9]+") ]]; then export RC_LABEL="conda-forge/label/rc::"; else export RC_LABEL=""; fi \
4748
&& /bin/bash -c 'for version in ${PYTHON_VERSIONS}; \
4849
do \
4950
CONDA_ENVS="py${version} py${version}_conda"; \
@@ -52,7 +53,7 @@ RUN true \
5253
$CONDA create -y -n $CONDA_ENV python=${version}; \
5354
done; \
5455
# khiops core \
55-
$CONDA install -y -n py${version}_conda khiops-core=$(echo ${KHIOPS_REVISION} | tr -d "-") ; \
56+
$CONDA install -y -n py${version}_conda ${RC_LABEL}khiops-core=$(echo ${KHIOPS_REVISION} | tr -d "-") ; \
5657
# remote files drivers installed in the conda environment \
5758
$CONDA install -y -n py${version}_conda -c khiops \
5859
khiops-driver-s3=${KHIOPS_S3_DRIVER_REVISION} \

0 commit comments

Comments
 (0)