diff --git a/.github/ci_images/bionic_builder.dockerfile b/.github/ci_images/bionic_builder.dockerfile index 64f8360..e80c08d 100644 --- a/.github/ci_images/bionic_builder.dockerfile +++ b/.github/ci_images/bionic_builder.dockerfile @@ -24,7 +24,7 @@ RUN apt update -q \ # vim less grep \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/debconf/* \ - && pip3 install meson==0.52.1 pytest gcovr requests + && pip3 install meson==0.52.1 pytest gcovr requests distro # Create user RUN useradd --create-home runner diff --git a/.github/ci_images/f31_builder.dockerfile b/.github/ci_images/f31_builder.dockerfile index 38cadc4..a96d7a5 100644 --- a/.github/ci_images/f31_builder.dockerfile +++ b/.github/ci_images/f31_builder.dockerfile @@ -7,6 +7,7 @@ RUN dnf install -y --nodocs \ # Base build tools make automake libtool cmake git-core subversion pkg-config gcc-c++ \ wget unzip ninja-build ccache which patch gcovr xz openssh-clients \ + python3-pip \ # Cross win32 compiler mingw32-gcc-c++ mingw32-bzip2-static mingw32-win-iconv-static \ mingw32-winpthreads-static mingw32-zlib-static mingw32-xz-libs-static \ @@ -18,7 +19,7 @@ RUN dnf install -y --nodocs \ && dnf remove -y "*-doc" \ && dnf autoremove -y \ && dnf clean all \ - && pip3 install meson==0.52.1 pytest requests + && pip3 install meson==0.52.1 pytest requests distro # Create user RUN useradd --create-home runner diff --git a/.github/ci_images/focal_builder.dockerfile b/.github/ci_images/focal_builder.dockerfile index 57fae3a..302ee13 100644 --- a/.github/ci_images/focal_builder.dockerfile +++ b/.github/ci_images/focal_builder.dockerfile @@ -25,7 +25,7 @@ RUN apt update -q \ # vim less grep \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/debconf/* \ - && pip3 install meson==0.52.1 pytest gcovr requests + && pip3 install meson==0.52.1 pytest gcovr requests distro # Create user RUN useradd --create-home runner diff --git a/.github/ci_images/xenial_builder.dockerfile b/.github/ci_images/xenial_builder.dockerfile index b060135..c4b4dcb 100644 --- a/.github/ci_images/xenial_builder.dockerfile +++ b/.github/ci_images/xenial_builder.dockerfile @@ -21,7 +21,7 @@ RUN apt update -q \ # vim less grep \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/debconf/* \ - && pip3 install meson==0.52.1 pytest gcovr requests + && pip3 install meson==0.52.1 pytest gcovr requests distro # Create user RUN useradd --create-home runner diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8d90b4..2578b17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: - cron: '0 1 * * *' env: - DOCKER_VERSION: 26 + DOCKER_VERSION: 29 jobs: Docker: @@ -97,7 +97,7 @@ jobs: runs-on: ubuntu-latest needs: Docker container: - image: "kiwix/kiwix-build_ci:${{matrix.image_variant}}-26" + image: "kiwix/kiwix-build_ci:${{matrix.image_variant}}-29" steps: - name: Checkout code shell: bash @@ -158,7 +158,7 @@ jobs: brew: pkg-config ninja - name: Install python modules run: | - pip3 install meson==0.52.1 pytest + pip3 install meson==0.52.1 pytest distro pip3 install --no-deps $GITHUB_WORKSPACE - name: secret shell: bash diff --git a/.github/workflows/releaseNigthly.yml b/.github/workflows/releaseNigthly.yml index ada69cf..f19f23a 100644 --- a/.github/workflows/releaseNigthly.yml +++ b/.github/workflows/releaseNigthly.yml @@ -8,7 +8,7 @@ on: - cron: '0 1 * * *' env: - DOCKER_VERSION: 28 + DOCKER_VERSION: 29 jobs: Docker: @@ -79,7 +79,7 @@ jobs: runs-on: ubuntu-latest needs: Docker container: - image: "kiwix/kiwix-build_ci:${{matrix.image_variant}}-28" + image: "kiwix/kiwix-build_ci:${{matrix.image_variant}}-29" options: "--device /dev/fuse --privileged" steps: - name: Checkout code diff --git a/kiwixbuild/buildenv.py b/kiwixbuild/buildenv.py index 73207e8..05f1e1e 100644 --- a/kiwixbuild/buildenv.py +++ b/kiwixbuild/buildenv.py @@ -2,6 +2,7 @@ import os, sys, shutil import subprocess import platform +import distro from .utils import pj, download_remote, Defaultdict from ._global import neutralEnv, option @@ -38,8 +39,7 @@ class PlatformNeutralEnv: if cont.lower() != 'y': sys.exit(0) if _platform == 'Linux': - self.distname, _, _ = platform.linux_distribution() - self.distname = self.distname.lower() + self.distname = distro.id() if self.distname == 'ubuntu': self.distname = 'debian' diff --git a/setup.py b/setup.py index 0deb12f..c53a024 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,8 @@ setup( packages=find_packages(), include_package_data=True, install_requires=[ - 'meson==0.52.1' + 'meson==0.52.1', + 'distro' ], entry_points={ 'console_scripts': [