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:
parent
d2fecbb97b
commit
301cd64636
2 changed files with 2 additions and 1 deletions
|
@ -19,6 +19,7 @@ jobs:
|
||||||
name: Setup environment variables
|
name: Setup environment variables
|
||||||
command: |
|
command: |
|
||||||
echo 'export DESTDIR=$HOME/destdir' >> "$BASH_ENV"
|
echo 'export DESTDIR=$HOME/destdir' >> "$BASH_ENV"
|
||||||
|
echo 'export IS_CIRCLE_CI=1' >> "$BASH_ENV"
|
||||||
|
|
||||||
# Download and install refpolicy headers for sepolgen tests
|
# Download and install refpolicy headers for sepolgen tests
|
||||||
- run:
|
- run:
|
||||||
|
|
|
@ -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 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"]')"
|
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'
|
export PYTHON_SETUP_ARGS='--install-layout=deb'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue