From 57ff4b417783b60e2bdc9ad0b16478f772b68e82 Mon Sep 17 00:00:00 2001 From: Chris Wells Wood Date: Fri, 9 Jun 2023 14:11:40 +0100 Subject: [PATCH] Admin: Adds elements required for building wheels. --- .gitignore | 1 + dev-requirements.txt | 4 ++++ make_wheels.sh | 32 ++++++++++++++++++++++++++++++++ setup.py | 2 +- 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 dev-requirements.txt create mode 100644 make_wheels.sh diff --git a/.gitignore b/.gitignore index 21b2c65..454b22b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ parts/ sdist/ var/ wheels/ +wheelhouse/ *.egg-info/ .installed.cfg *.egg diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000..c219e9e --- /dev/null +++ b/dev-requirements.txt @@ -0,0 +1,4 @@ +flake8 +pytest +hypothesis +cython diff --git a/make_wheels.sh b/make_wheels.sh new file mode 100644 index 0000000..f751a75 --- /dev/null +++ b/make_wheels.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -e -u -x + +function repair_wheel { + wheel="$1" + if ! auditwheel show "$wheel"; then + echo "Skipping non-platform wheel $wheel" + else + auditwheel repair "$wheel" --plat "$PLAT" -w /io/wheelhouse/ + fi +} + + +# Install a system package required by our library +yum install -y atlas-devel + +# Compile wheels +for PYBIN in /opt/python/*/bin; do + "${PYBIN}/pip" install -r /io/dev-requirements.txt + "${PYBIN}/pip" wheel /io/ --no-deps -w wheelhouse/ +done + +# Bundle external shared libraries into the wheels +for whl in wheelhouse/*.whl; do + repair_wheel "$whl" +done + +# Install packages and test +for PYBIN in /opt/python/*/bin/; do + "${PYBIN}/pip" install python-manylinux-demo --no-index -f /io/wheelhouse + (cd "$HOME"; "${PYBIN}/nosetests" pymanylinuxdemo) +done diff --git a/setup.py b/setup.py index 8f79e50..720b1cc 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ def readme(): setup( name="AMPAL", - version="1.4.0", + version="1.5.0", description="A simple framework for representing biomolecular structure.", long_description=readme(), long_description_content_type="text/markdown; charset=UTF-8; variant=GFM",