diff --git a/builddeb b/builddeb index b1acccd5..238e092b 100755 --- a/builddeb +++ b/builddeb @@ -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