build-python-wheel.sh (806B)
1 #!/bin/sh 2 # This Source Code Form is subject to the terms of the Mozilla Public 3 # License, v. 2.0. If a copy of the MPL was not distributed with this 4 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 # 6 # This script builds the official interpreter for the python language, 7 # while also packing in a few default extra packages. 8 9 set -e 10 set -x 11 12 UPLOAD_DIR=$(pwd)/artifacts 13 mkdir -p "${UPLOAD_DIR}" 14 15 ls -hal "${MOZ_FETCHES_DIR}" 16 WHEEL_DIR=$(find "$MOZ_FETCHES_DIR/" -maxdepth 1 -mindepth 1 -type d -not -name "python") 17 18 export PATH="$MOZ_FETCHES_DIR/python/bin":/builds/worker/.local/bin:$PATH 19 20 python3 -m venv venv 21 . venv/bin/activate 22 python3 -m pip install -r "${GECKO_PATH}/build/wheel_requirements.txt" 23 24 cd "$WHEEL_DIR" 25 python3 setup.py bdist_wheel 26 whl=$(ls dist/*.whl) 27 28 cp "$whl" "$UPLOAD_DIR/"