pack-cpython.sh (891B)
1 #!/bin/bash 2 set -x -e -v 3 4 # This script is for extracting python bianry for windows from setup file. 5 6 ARTIFACT_NAME=win64-cpython.tar.zst 7 PYTHON_INSTALLER=`echo $MOZ_FETCHES_DIR/python-3.*-amd64.exe` 8 WINE=$MOZ_FETCHES_DIR/wine/bin/wine 9 10 cabextract $PYTHON_INSTALLER 11 12 tardir=python 13 mkdir $tardir 14 pushd $tardir 15 msiextract ../* 16 rm -f api-ms-win-* 17 18 # bundle pip 19 $WINE python.exe -m ensurepip 20 $WINE python.exe -m pip install --upgrade pip==23.0 21 $WINE python.exe -m pip install --only-binary ':all:' -r ${GECKO_PATH}/build/psutil_requirements.txt -r ${GECKO_PATH}/build/zstandard_requirements.txt 22 23 # extra symlinks to have a consistent install with Linux and OSX 24 ln -s python.exe python3.exe 25 chmod u+x python3.exe 26 27 ln -s ./Scripts/pip3.exe pip3.exe 28 chmod u+x pip3.exe 29 30 31 popd 32 33 tar caf `basename ${TOOLCHAIN_ARTIFACT}` ${tardir} 34 35 mkdir -p $UPLOAD_DIR 36 mv `basename ${TOOLCHAIN_ARTIFACT}` $UPLOAD_DIR