Skip to content

Commit c533467

Browse files
author
Thierry RAMORASOAVINA
committed
Temporary hack to install pip packages under debian13
1 parent 334acd5 commit c533467

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

.github/workflows/pip.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,19 @@ jobs:
8989
with:
9090
name: pip-package
9191
- name: Install package
92+
shell: bash
9293
run: |
9394
# Allow Pip to write to its cache
9495
mkdir -p /github/home/.cache/pip
9596
chown -R $(whoami) /github/home/.cache/pip
9697
# Install the Khiops Python library
97-
pip install --upgrade pip
98-
pip install $(ls khiops*.tar.gz)
98+
99+
# Hack for pip under debian, the alternatives are using venv or pipx
100+
if [[ "${{ matrix.container }}" == "debian13" ]]; then
101+
BREAK_SYSTEM_PACKAGES_FLAG="--break-system-packages"
102+
fi
103+
pip install ${BREAK_SYSTEM_PACKAGES_FLAG} --upgrade pip
104+
pip install ${BREAK_SYSTEM_PACKAGES_FLAG} $(ls khiops*.tar.gz)
99105
- name: Run tests
100106
env:
101107
KHIOPS_SAMPLES_DIR: ${{ github.workspace }}/khiops-samples

.github/workflows/tests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,20 +356,25 @@ jobs:
356356
ref: ${{ env.SAMPLES_REVISION }}
357357
token: ${{ secrets.GITHUB_TOKEN }}
358358
path: khiops-samples
359+
- name: Hack for pip under debian13
360+
if: matrix.container == 'debian13'
361+
run: |
362+
# Hack for pip under debian, the alternatives are using venv or pipx
363+
export BREAK_SYSTEM_PACKAGES_FLAG="--break-system-packages"
359364
- name: Install khiops-python dev dependencies
360365
run: |
361366
# The following git command is required,
362367
# as the Git repository is in a directory the current user does not own,
363368
# Python versioneer fails to compute the current version correctly otherwise
364369
git config --global --add safe.directory $(realpath .)
365370
# Install tomli for Python < 3.11
366-
pip install --user tomli
371+
pip install ${BREAK_SYSTEM_PACKAGES_FLAG} tomli
367372
python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" > requires.txt
368-
pip install --user `cat requires.txt`
373+
pip install ${BREAK_SYSTEM_PACKAGES_FLAG} `cat requires.txt`
369374
rm -f requires.txt
370375
- name: Setup and Install Test Requirements
371376
run: |
372-
pip install -r test-requirements.txt
377+
pip install ${BREAK_SYSTEM_PACKAGES_FLAG} -r test-requirements.txt
373378
- name: Test Khiops Integration
374379
env:
375380
# Force > 2 CPU cores to launch mpiexec

0 commit comments

Comments
 (0)