CircleCI: do not add Debian-specific parameter when invoking setup.py

Runners on https://circleci.com/ use a custom version of Python without
Debian-specific patches which added option --install-layout=deb. This
leads to the following error:

    error: option --install-layout not recognized

Fix this by creating a new environment variable dedicated to detect
CircleCI platform.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
Nicolas Iooss 2022-06-29 09:12:54 +02:00 committed by James Carter
parent d2fecbb97b
commit 301cd64636
2 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ jobs:
name: Setup environment variables
command: |
echo 'export DESTDIR=$HOME/destdir' >> "$BASH_ENV"
echo 'export IS_CIRCLE_CI=1' >> "$BASH_ENV"
# Download and install refpolicy headers for sepolgen tests
- run:

View File

@ -24,7 +24,7 @@ export PATH="$DESTDIR/usr/sbin:$DESTDIR/usr/bin:$DESTDIR/sbin:$DESTDIR/bin:$PATH
export PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "from distutils.sysconfig import *;print(get_python_lib(prefix='/usr'))")"
export RUBYLIB="$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorlibdir"]'):$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorarchdir"]')"
if [ -f /etc/debian_version ]; then
if [ -f /etc/debian_version ] && [ -z "${IS_CIRCLE_CI:-}" ] ; then
export PYTHON_SETUP_ARGS='--install-layout=deb'
fi