Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build wheels from source dists #437

Merged
merged 3 commits into from
Feb 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
)