Merge pull request #444 from kiwix/use_distro
This commit is contained in:
commit
f632ef8fcc
|
@ -24,7 +24,7 @@ RUN apt update -q \
|
||||||
# vim less grep \
|
# vim less grep \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/debconf/* \
|
&& 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
|
# Create user
|
||||||
RUN useradd --create-home runner
|
RUN useradd --create-home runner
|
||||||
|
|
|
@ -7,6 +7,7 @@ RUN dnf install -y --nodocs \
|
||||||
# Base build tools
|
# Base build tools
|
||||||
make automake libtool cmake git-core subversion pkg-config gcc-c++ \
|
make automake libtool cmake git-core subversion pkg-config gcc-c++ \
|
||||||
wget unzip ninja-build ccache which patch gcovr xz openssh-clients \
|
wget unzip ninja-build ccache which patch gcovr xz openssh-clients \
|
||||||
|
python3-pip \
|
||||||
# Cross win32 compiler
|
# Cross win32 compiler
|
||||||
mingw32-gcc-c++ mingw32-bzip2-static mingw32-win-iconv-static \
|
mingw32-gcc-c++ mingw32-bzip2-static mingw32-win-iconv-static \
|
||||||
mingw32-winpthreads-static mingw32-zlib-static mingw32-xz-libs-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 remove -y "*-doc" \
|
||||||
&& dnf autoremove -y \
|
&& dnf autoremove -y \
|
||||||
&& dnf clean all \
|
&& dnf clean all \
|
||||||
&& pip3 install meson==0.52.1 pytest requests
|
&& pip3 install meson==0.52.1 pytest requests distro
|
||||||
|
|
||||||
# Create user
|
# Create user
|
||||||
RUN useradd --create-home runner
|
RUN useradd --create-home runner
|
||||||
|
|
|
@ -25,7 +25,7 @@ RUN apt update -q \
|
||||||
# vim less grep \
|
# vim less grep \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/debconf/* \
|
&& 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
|
# Create user
|
||||||
RUN useradd --create-home runner
|
RUN useradd --create-home runner
|
||||||
|
|
|
@ -21,7 +21,7 @@ RUN apt update -q \
|
||||||
# vim less grep \
|
# vim less grep \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/debconf/* \
|
&& 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
|
# Create user
|
||||||
RUN useradd --create-home runner
|
RUN useradd --create-home runner
|
||||||
|
|
|
@ -6,7 +6,7 @@ on:
|
||||||
- cron: '0 1 * * *'
|
- cron: '0 1 * * *'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOCKER_VERSION: 26
|
DOCKER_VERSION: 29
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Docker:
|
Docker:
|
||||||
|
@ -97,7 +97,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: Docker
|
needs: Docker
|
||||||
container:
|
container:
|
||||||
image: "kiwix/kiwix-build_ci:${{matrix.image_variant}}-26"
|
image: "kiwix/kiwix-build_ci:${{matrix.image_variant}}-29"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -158,7 +158,7 @@ jobs:
|
||||||
brew: pkg-config ninja
|
brew: pkg-config ninja
|
||||||
- name: Install python modules
|
- name: Install python modules
|
||||||
run: |
|
run: |
|
||||||
pip3 install meson==0.52.1 pytest
|
pip3 install meson==0.52.1 pytest distro
|
||||||
pip3 install --no-deps $GITHUB_WORKSPACE
|
pip3 install --no-deps $GITHUB_WORKSPACE
|
||||||
- name: secret
|
- name: secret
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -8,7 +8,7 @@ on:
|
||||||
- cron: '0 1 * * *'
|
- cron: '0 1 * * *'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOCKER_VERSION: 28
|
DOCKER_VERSION: 29
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Docker:
|
Docker:
|
||||||
|
@ -79,7 +79,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: Docker
|
needs: Docker
|
||||||
container:
|
container:
|
||||||
image: "kiwix/kiwix-build_ci:${{matrix.image_variant}}-28"
|
image: "kiwix/kiwix-build_ci:${{matrix.image_variant}}-29"
|
||||||
options: "--device /dev/fuse --privileged"
|
options: "--device /dev/fuse --privileged"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import os, sys, shutil
|
import os, sys, shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import platform
|
import platform
|
||||||
|
import distro
|
||||||
|
|
||||||
from .utils import pj, download_remote, Defaultdict
|
from .utils import pj, download_remote, Defaultdict
|
||||||
from ._global import neutralEnv, option
|
from ._global import neutralEnv, option
|
||||||
|
@ -38,8 +39,7 @@ class PlatformNeutralEnv:
|
||||||
if cont.lower() != 'y':
|
if cont.lower() != 'y':
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
if _platform == 'Linux':
|
if _platform == 'Linux':
|
||||||
self.distname, _, _ = platform.linux_distribution()
|
self.distname = distro.id()
|
||||||
self.distname = self.distname.lower()
|
|
||||||
if self.distname == 'ubuntu':
|
if self.distname == 'ubuntu':
|
||||||
self.distname = 'debian'
|
self.distname = 'debian'
|
||||||
|
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -35,7 +35,8 @@ setup(
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'meson==0.52.1'
|
'meson==0.52.1',
|
||||||
|
'distro'
|
||||||
],
|
],
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
|
|
Loading…
Reference in New Issue