steps: - checkout: self submodules: true - template: azure-install-rust.yml - bash: mkdir misc/wasmtime-py/wheelhouse displayName: Pre-create wheelhouse directory # Note that we skip this on Linux because Python 3.6 is pre-installed in the # CentOS container. - task: UsePythonVersion@0 inputs: versionSpec: '3.6' addToPath: true condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux')) # Install Python dependencies needed for our `setup.py` scripts - bash: sudo pip3 install setuptools wheel==0.31.1 setuptools-rust auditwheel displayName: Install Python dependencies (Linux) condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - bash: pip3 install setuptools wheel==0.31.1 setuptools-rust displayName: Install Python dependencies (not Linux) condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux')) - bash: python setup.py bdist_wheel workingDirectory: misc/wasmtime-py displayName: Build wheels py36 # Clear the build directory between building different wheels for different # Python versions to ensure that we don't package dynamic libraries twice by # accident. - bash: rm -rf build workingDirectory: misc/wasmtime-py displayName: Clear build directory # Note that 3.7 isn't installed on Linux so we don't do this a second time # around. - task: UsePythonVersion@0 inputs: versionSpec: '3.7' addToPath: true condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux')) - bash: sudo bash ci/setup_centos6_python37.sh condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - bash: sudo pip3 install setuptools wheel==0.31.1 setuptools-rust auditwheel displayName: Install Python dependencies (Linux) condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - bash: pip3 install setuptools wheel==0.31.1 setuptools-rust displayName: Install Python dependencies (not Linux) condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux')) - bash: | set -e export PYTHON_SYS_EXECUTABLE=`which python3.7` $PYTHON_SYS_EXECUTABLE setup.py bdist_wheel workingDirectory: misc/wasmtime-py displayName: Build wheels py37 condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - bash: python setup.py bdist_wheel workingDirectory: misc/wasmtime-py displayName: Build wheels py37 condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux')) # Move `dist/*.whl` into `wheelhouse/` so we can deploy them, but on Linux we # need to run an `auditwheel` command as well to turn these into "manylinux" # wheels to run across a number of distributions. - bash: mv dist/*.whl wheelhouse/ workingDirectory: misc/wasmtime-py displayName: Move wheels to wheelhouse (not Linux) condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux')) - bash: | set -e for whl in dist/*.whl; do auditwheel repair "$whl" -w wheelhouse/ done workingDirectory: misc/wasmtime-py displayName: Move wheels to wheelhouse (Linux) condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) # Publish our wheelhouse to azure pipelines which will later get published to # github releases - task: PublishPipelineArtifact@1 inputs: path: misc/wasmtime-py/wheelhouse artifactName: 'wheels-$(Agent.OS)'