Skip to content

Commit

Permalink
Fix(test.sh): use build requirements
Browse files Browse the repository at this point in the history
setuptools has been bumpend and caused issue with buidling.
Instead of updating setuptools directly in test.sh, use build
requirements with pinned dependencies and gated by CI

This will also ensure testing of requirements-build.txt

To avoid interference with RPM installed deps a virtualenv has been
used.

Signed-off-by: Martin Basti <[email protected]>
  • Loading branch information
MartinBasti committed Aug 13, 2024
1 parent 68216d8 commit bbf5992
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ function setup_osbs() {
cairo-devel gobject-introspection-devel cairo-gobject-devel ostree)
PKG_EXTRA+=("${PKG_COMMON_EXTRA[@]}")

python -m venv testenv
source "testenv/bin/activate"

PIP_INST=("$PIP" install --index-url "${PYPI_INDEX:-https://pypi.org/simple}")

# RPM install basic dependencies
Expand All @@ -59,11 +62,9 @@ function setup_osbs() {
# Upgrade pip to provide latest features for successful installation
$RUN "${PIP_INST[@]}" --upgrade "pip<23.1"

$RUN "${PIP_INST[@]}" -r requirements-build.txt

if [[ $OS == rockylinux ]]; then
# Pip install/upgrade setuptools. Older versions of setuptools don't understand
# environment markers, also rockylinux needs to have setuptools updates to make
# pytest-cov work
$RUN "${PIP_INST[@]}" --upgrade setuptools
# install with RPM_PY_SYS=true to avoid error caused by installing on system python
$RUN sh -c "RPM_PY_SYS=true ${PIP_INST[*]} rpm-py-installer"
fi
Expand Down

0 comments on commit bbf5992

Please sign in to comment.