Skip to content

Commit a273a68

Browse files
authored
Install azure cli using python 3.14 on fedora (#1684)
1 parent c6e328b commit a273a68

4 files changed

Lines changed: 58 additions & 10 deletions

File tree

src/fedora/45/amd64/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ RUN dnf upgrade --refresh -y \
1818
ninja-build \
1919
pigz \
2020
python \
21+
# Python 3.14 hosts azure-cli (installed via pip below)
22+
python3.14 \
2123
which \
2224
# Tools used by build automation
23-
azure-cli \
2425
git \
2526
jq \
2627
tar \
@@ -53,6 +54,16 @@ RUN dnf upgrade --refresh -y \
5354
icu \
5455
&& dnf clean all
5556

57+
# Install azure-cli from pip into a dedicated Python 3.14 virtual environment.
58+
# Fedora 45's default Python is 3.15 (beta), for which the distro azure-cli RPM
59+
# won't resolve and azure-cli's native deps have no prebuilt wheels. Python 3.14
60+
# has wheels for those deps, so install azure-cli there and symlink az.
61+
RUN azureEnv="/usr/local/share/azure-cli-env" \
62+
&& python3.14 -m venv "$azureEnv" \
63+
&& "$azureEnv/bin/python" -m pip install --upgrade pip setuptools \
64+
&& "$azureEnv/bin/python" -m pip install azure-cli \
65+
&& ln -s "$azureEnv/bin/az" /usr/local/bin/az
66+
5667
# Install PowerShell
5768
RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-x64.tar.gz -o /tmp/powershell.tar.gz \
5869
&& mkdir -p /opt/microsoft/powershell \

src/fedora/45/helix/amd64/Dockerfile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ RUN dnf upgrade --refresh -y \
99
dnf-plugins-core \
1010
&& dnf install --setopt=install_weak_deps=False --setopt tsflags=nodocs -y \
1111
openssl \
12-
python3-devel \
12+
# Use Python 3.14 to build the venv: Fedora 45's default Python is 3.15
13+
# (beta), for which helix-scripts' native deps (cffi, cryptography) have no wheels.
14+
python3.14 \
1315
python3-pip \
1416
gcc \
1517
libatomic \
1618
redhat-rpm-config \
1719
&& dnf clean all
1820

19-
RUN python3 -m venv /venv \
21+
RUN python3.14 -m venv /venv \
2022
&& source /venv/bin/activate \
2123
&& pip download --no-deps --index-url $HELIX_FEED --extra-index-url $PIP_INDEX_URL helix-scripts \
2224
&& pip install --index-url $PIP_INDEX_URL ./helix_scripts-*-py3-none-any.whl \
@@ -42,8 +44,9 @@ RUN dnf upgrade --refresh -y \
4244
# Helix dependencies
4345
python3 \
4446
python3-pip \
47+
# Python 3.14 hosts azure-cli (installed via pip below)
48+
python3.14 \
4549
# Tools used by build automation
46-
azure-cli \
4750
git \
4851
jq \
4952
tar \
@@ -66,6 +69,16 @@ ENV \
6669
# Needed for .NET libraries tests to pass
6770
LANG=en-US.UTF-8
6871

72+
# Install azure-cli from pip into a dedicated Python 3.14 virtual environment.
73+
# Fedora 45's default Python is 3.15 (beta), for which the distro azure-cli RPM
74+
# won't resolve and azure-cli's native deps have no prebuilt wheels. Python 3.14
75+
# has wheels for those deps, so install azure-cli there and symlink az.
76+
RUN azureEnv="/usr/local/share/azure-cli-env" \
77+
&& python3.14 -m venv "$azureEnv" \
78+
&& "$azureEnv/bin/python" -m pip install --upgrade pip setuptools \
79+
&& "$azureEnv/bin/python" -m pip install azure-cli \
80+
&& ln -s "$azureEnv/bin/az" /usr/local/bin/az
81+
6982
# create helixbot user and give rights to sudo without password
7083
# Fedora does not have all options as other Linux systems
7184
RUN /usr/sbin/adduser --uid 1000 --shell /bin/bash --group adm helixbot \
@@ -77,6 +90,6 @@ USER helixbot
7790
ENV VIRTUAL_ENV=/home/helixbot/.vsts-env
7891

7992
# Install Helix Dependencies
80-
RUN python3 -m venv $VIRTUAL_ENV
93+
RUN python3.14 -m venv $VIRTUAL_ENV
8194
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
8295
COPY --from=venv --chown=helixbot /venv $VIRTUAL_ENV

src/fedora/rawhide/amd64/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ RUN dnf upgrade --refresh -y \
1818
ninja-build \
1919
pigz \
2020
python \
21+
# Python 3.14 hosts azure-cli (installed via pip below)
22+
python3.14 \
2123
which \
2224
# Tools used by build automation
23-
azure-cli \
2425
git \
2526
jq \
2627
tar \
@@ -53,6 +54,16 @@ RUN dnf upgrade --refresh -y \
5354
icu \
5455
&& dnf clean all
5556

57+
# Install azure-cli from pip into a dedicated Python 3.14 virtual environment.
58+
# Fedora rawhide's default Python is 3.15 (beta), for which the distro azure-cli
59+
# RPM won't resolve and azure-cli's native deps have no prebuilt wheels. Python
60+
# 3.14 has wheels for those deps, so install there and symlink az.
61+
RUN azureEnv="/usr/local/share/azure-cli-env" \
62+
&& python3.14 -m venv "$azureEnv" \
63+
&& "$azureEnv/bin/python" -m pip install --upgrade pip setuptools \
64+
&& "$azureEnv/bin/python" -m pip install azure-cli \
65+
&& ln -s "$azureEnv/bin/az" /usr/local/bin/az
66+
5667
# Install PowerShell
5768
RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-x64.tar.gz -o /tmp/powershell.tar.gz \
5869
&& mkdir -p /opt/microsoft/powershell \

src/fedora/rawhide/helix/amd64/Dockerfile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ RUN dnf upgrade --refresh -y \
99
dnf-plugins-core \
1010
&& dnf install --setopt=install_weak_deps=False --setopt tsflags=nodocs -y \
1111
openssl \
12-
python3-devel \
12+
# Use Python 3.14 to build the venv: Fedora rawhide's default Python is
13+
# 3.15 (beta), for which helix-scripts' native deps (cffi, cryptography) have no wheels.
14+
python3.14 \
1315
python3-pip \
1416
gcc \
1517
libatomic \
1618
redhat-rpm-config \
1719
&& dnf clean all
1820

19-
RUN python3 -m venv /venv \
21+
RUN python3.14 -m venv /venv \
2022
&& source /venv/bin/activate \
2123
&& pip download --no-deps --index-url $HELIX_FEED --extra-index-url $PIP_INDEX_URL helix-scripts \
2224
&& pip install --index-url $PIP_INDEX_URL ./helix_scripts-*-py3-none-any.whl \
@@ -42,8 +44,9 @@ RUN dnf upgrade --refresh -y \
4244
# Helix dependencies
4345
python3 \
4446
python3-pip \
47+
# Python 3.14 hosts azure-cli (installed via pip below)
48+
python3.14 \
4549
# Tools used by build automation
46-
azure-cli \
4750
git \
4851
jq \
4952
tar \
@@ -66,6 +69,16 @@ ENV \
6669
# Needed for .NET libraries tests to pass
6770
LANG=en-US.UTF-8
6871

72+
# Install azure-cli from pip into a dedicated Python 3.14 virtual environment.
73+
# Fedora rawhide's default Python is 3.15 (beta), for which the distro azure-cli
74+
# RPM won't resolve and azure-cli's native deps have no prebuilt wheels. Python
75+
# 3.14 has wheels for those deps, so install there and symlink az.
76+
RUN azureEnv="/usr/local/share/azure-cli-env" \
77+
&& python3.14 -m venv "$azureEnv" \
78+
&& "$azureEnv/bin/python" -m pip install --upgrade pip setuptools \
79+
&& "$azureEnv/bin/python" -m pip install azure-cli \
80+
&& ln -s "$azureEnv/bin/az" /usr/local/bin/az
81+
6982
# create helixbot user and give rights to sudo without password
7083
# Fedora does not have all options as other Linux systems
7184
RUN /usr/sbin/adduser --uid 1000 --shell /bin/bash --group adm helixbot \
@@ -77,6 +90,6 @@ USER helixbot
7790
ENV VIRTUAL_ENV=/home/helixbot/.vsts-env
7891

7992
# Install Helix Dependencies
80-
RUN python3 -m venv $VIRTUAL_ENV
93+
RUN python3.14 -m venv $VIRTUAL_ENV
8194
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
8295
COPY --from=venv --chown=helixbot /venv $VIRTUAL_ENV

0 commit comments

Comments
 (0)