2
0
mirror of https://opendev.org/x/pyghmi synced 2026-03-27 13:23:30 +00:00

Merge "Use python3 for pyghmi builds except Wheezy"

This commit is contained in:
Zuul
2020-01-14 15:38:00 +00:00
committed by Gerrit Code Review

View File

@@ -3,15 +3,20 @@ cd `dirname $0`
mkdir -p /tmp/pyghmi
cp -a * .git /tmp/pyghmi
cd /tmp/pyghmi
export PYEXEC=python3
export DSCARGS="--with-python2=True --with-python3=True"
if grep wheezy /etc/os-release; then
# wheezy is difficult on pyca, use cryptodomex for that platform
patch -p1 < wheezy.patch
# also it's old, use python2 instead of python3
export PYEXEC=python
export DSCARGS="--with-python2=True --with-python3=False"
fi
# If not PBR, use the setup.py.tmpl
python -c 'import pbr' || ./makesetup
VERSION=`python setup.py --version`
python setup.py sdist
py2dsc dist/pyghmi-$VERSION.tar.gz
$PYEXEC -c 'import pbr' || ./makesetup
VERSION=`$PYEXEC setup.py --version`
$PYEXEC setup.py sdist
py2dsc $DSCARGS dist/pyghmi-$VERSION.tar.gz
shopt -s extglob
cd deb_dist/!(*.orig)/
dpkg-buildpackage -rfakeroot -uc -us -i