Skip to content

Commit

Permalink
[wasmtime-py] Build wheels for python37 on linux (bytecodealliance#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurydelendik authored and tschneidereit committed Aug 30, 2019
1 parent 059c437 commit eced4dd
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
18 changes: 16 additions & 2 deletions ci/azure-build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,24 @@ steps:
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
pip3 install setuptools wheel==0.31.1 setuptools-rust
python setup.py bdist_wheel
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'))
Expand Down
32 changes: 32 additions & 0 deletions ci/setup_centos6_python37.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
set -e

# Python 3.6 stands in our way -- nuking it
yum erase -y rh-python36
rm -rf /opt/rh/rh-python36

yum install -y gcc bzip2-devel libffi-devel zlib-devel

cd /usr/src/

# pip3.7 needs new openssl
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz
tar -zxvf OpenSSL_1_1_1c.tar.gz
cd openssl-OpenSSL_1_1_1c
./Configure shared zlib linux-x86_64
make -sj4
make install
cd ..
rm -rf openssl-OpenSSL_1_1_1c

# Fixing libssl.so.1.1: cannot open shared object file
echo "/usr/local/lib64" >> /etc/ld.so.conf && ldconfig

curl -O -L https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
tar xzf Python-3.7.3.tgz
cd Python-3.7.3
./configure
make -sj4
make install
cd ..
rm -rf Python-3.7.3

0 comments on commit eced4dd

Please sign in to comment.