Build wheels from source dists
@@ -9,16 +9,29 @@ set -ev
python3 -m pip install --upgrade pip setuptools wheel
BASEDIR=$(dirname $(readlink -f $(dirname $0)))
+DISTDIR=dist
(
cd $BASEDIR
- mkdir -p dist
- rm -rf dist/*
+ mkdir -p $DISTDIR
+ rm -r $DISTDIR/*
for d in opentelemetry-api/ opentelemetry-sdk/ ext/*/ ; do
(
+ echo "building $d"
cd "$d"
- python3 setup.py --verbose bdist_wheel --dist-dir "$BASEDIR/dist/"
+ # Some ext directories (such as docker tests) are not intended to be
+ # packaged. Verify the intent by looking for a setup.py.
+ if [ -f setup.py ]; then
+ python3 setup.py sdist --dist-dir "$BASEDIR/dist/" clean --all
+ fi
)
done
+ # Build a wheel for each source distribution
+ (
+ cd $DISTDIR
+ for x in *.tar.gz ; do
+ pip wheel --no-deps $x
+ done
+ )
)
