Skip to content

Commit

Permalink
Tweak docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
nabla-c0d3 committed Mar 16, 2020
1 parent 40acb84 commit 832ad79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
15 changes: 1 addition & 14 deletions build_linux_wheels.sh
@@ -1,15 +1,6 @@
#!/bin/bash
set -e -x

# Update perl as OpenSSL 1.1.x requires 5.10; there's probably a better/Docker way to do this
curl http://www.cpan.org/src/perl-5.10.1.tar.gz -o perl-5.10.1.tar.gz
tar -xzf perl-5.10.1.tar.gz
cd perl-5.10.1
./Configure -des -Dprefix=$HOME/localperl
make
make install
export PATH=$HOME/localperl/bin:$PATH


cd /io

Expand All @@ -20,17 +11,13 @@ cd /io
"/opt/python/cp37-cp37m/bin/pipenv" run invoke build.legacy-openssl
"/opt/python/cp37-cp37m/bin/pipenv" run invoke build.modern-openssl

# Create a requirements file as we won't use pipenv after this point
"/opt/python/cp37-cp37m/bin/pipenv" lock -r --dev > requirements.txt

# Now build the Python extension and wheel
for PYBIN in "cp37-cp37m" "cp38-cp38"; do
"/opt/python/${PYBIN}/bin/python" setup.py clean --all
"/opt/python/${PYBIN}/bin/python" setup.py build_ext -i
"/opt/python/${PYBIN}/bin/pip" install -r requirements.txt

# Compile wheels
"/opt/python/${PYBIN}/bin/pip" wheel /io/ -w wheelhouse/
"/opt/python/${PYBIN}/bin/pip" wheel /io -w wheelhouse/
done


Expand Down
4 changes: 2 additions & 2 deletions tasks.py
Expand Up @@ -25,8 +25,8 @@ def test(ctx):
def package_linux_wheels(ctx):
"""Build the Linux 32 and 64 bit wheels using Docker.
"""
ctx.run(f"docker run --rm -v {root_path}:/io quay.io/pypa/manylinux1_i686 bash /io/build_linux_wheels.sh")
ctx.run(f"docker run --rm -v {root_path}:/io quay.io/pypa/manylinux1_x86_64 bash /io/build_linux_wheels.sh")
ctx.run(f"docker run --rm -v {root_path}:/io quay.io/pypa/manylinux2010_i686 bash /io/build_linux_wheels.sh")
ctx.run(f"docker run --rm -v {root_path}:/io quay.io/pypa/manylinux2010_x86_64 bash /io/build_linux_wheels.sh")


@task
Expand Down

0 comments on commit 832ad79

Please sign in to comment.