From d10071c4f678a269da77b571b59dd11e32c51646 Mon Sep 17 00:00:00 2001 From: Tamas Nepusz Date: Mon, 1 Jul 2024 20:20:05 +0200 Subject: [PATCH] ci: trying to fix CentOS 7 deprecation --- .github/workflows/build.yml | 4 ++-- scripts/fixup_centos_7_in_ci.sh | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 scripts/fixup_centos_7_in_ci.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 760081073..22056bec2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: - name: Build wheels (manylinux) uses: pypa/cibuildwheel@v2.19.1 env: - CIBW_BEFORE_BUILD: "yum install -y flex bison libxml2-devel zlib-devel cairo-devel && pip install -U cmake pip setuptools wheel && python setup.py build_c_core" + CIBW_BEFORE_BUILD: "bash scripts/fixup_centos_7_in_ci.sh && yum install -y flex bison libxml2-devel zlib-devel cairo-devel && pip install -U cmake pip setuptools wheel && python setup.py build_c_core" CIBW_BUILD: "*-manylinux_${{ matrix.wheel_arch }}" # Skip tests for Python 3.10 onwards because SciPy does not have # 32-bit wheels for Linux @@ -66,7 +66,7 @@ jobs: - name: Build wheels (manylinux) uses: pypa/cibuildwheel@v2.19.1 env: - CIBW_BEFORE_BUILD: "yum install -y flex bison libxml2-devel zlib-devel cairo-devel && pip install -U cmake pip setuptools wheel && python setup.py build_c_core" + CIBW_BEFORE_BUILD: "bash scripts/fixup_centos_7_in_ci.sh && yum install -y flex bison libxml2-devel zlib-devel cairo-devel && pip install -U cmake pip setuptools wheel && python setup.py build_c_core" CIBW_ARCHS_LINUX: aarch64 CIBW_BUILD: "*-manylinux_aarch64" diff --git a/scripts/fixup_centos_7_in_ci.sh b/scripts/fixup_centos_7_in_ci.sh new file mode 100755 index 000000000..bbc30fb5f --- /dev/null +++ b/scripts/fixup_centos_7_in_ci.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Workaround for cibuildwheel Docker images using CentOS 7 now that CentOS 7 +# is gone. + +sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo +sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo +