2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2019 The Linux Foundation and others.
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
11 echo "---> pypi-dist-build.sh"
13 # Script to create Python source and binary distributions
14 # Requires project file "setup.py"
16 # Ensure we fail the job if any steps fail.
19 echo "INFO: creating virtual environment"
20 virtualenv -p python3 /tmp/pypi
21 PATH=/tmp/pypi/bin:$PATH
22 pipup="python -m pip install -q --upgrade setuptools twine wheel"
27 if $BUILD_BDIST_WHEEL; then
28 echo "INFO: adding wheel to build binary distribution"
32 echo "INFO: cd to tox-dir $TOX_DIR"
33 cd "$WORKSPACE/$TOX_DIR"
35 echo "INFO: creating distributions"
36 python3 setup.py sdist $bdist
38 echo "INFO: checking distributions"
41 echo "---> pypi-dist-build.sh ends"