Skip to content

Commit

Permalink
Small build fixes
Browse files Browse the repository at this point in the history
Use `pytest` for running tests.
Remove redundant make command in Dockerfile.
Update wheel logic.

Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
  • Loading branch information
noxdafox committed May 22, 2021
1 parent 3e5edc6 commit f0ce8c9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PYTHON ?= python
CLIPS_VERSION ?= 6.40
CLIPS_SOURCE_URL ?= "https://sourceforge.net/projects/clipsrules/files/CLIPS/6.40/clips_core_source_640.zip "
CLIPS_SOURCE_URL ?= "https://sourceforge.net/projects/clipsrules/files/CLIPS/6.40/clips_core_source_640.zip"
MAKEFILE_NAME ?= makefile
SHARED_LIBRARY_DIR ?= /usr/lib

Expand Down
1 change: 0 additions & 1 deletion manylinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ COPY . /io

WORKDIR /io

RUN make clips_source
RUN make install-clips

CMD "./manylinux/build-wheels.sh"
14 changes: 10 additions & 4 deletions manylinux/build-wheels.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
#!/bin/bash

PLATFORM=manylinux2014_x86_64

set -e -x

# Compile wheels
for PYBIN in /opt/python/*/bin; do
"${PYBIN}/pip" install cffi nose setuptools
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
"${PYBIN}/pip" install cffi pytest setuptools
"${PYBIN}/pip" wheel /io/ --no-deps -w wheelhouse/
done

# Bundle external shared libraries into the wheels
for whl in wheelhouse/*.whl; do
auditwheel repair "$whl" --plat manylinux2014_x86_64 -w /io/wheelhouse/
if ! auditwheel show "$whl"; then
echo "Skipping non-platform wheel $whl"
else
auditwheel repair "$whl" --plat "$PLATFORM" -w /io/wheelhouse/
fi
done

# Install packages and test
for PYBIN in /opt/python/*/bin; do
"${PYBIN}/pip" install clipspy --no-index -f /io/wheelhouse
(cd "$HOME"; "${PYBIN}/nosetests" -v /io/test)
(cd "$HOME"; "${PYBIN}/pytest" -v /io/test)
done

0 comments on commit f0ce8c9

Please sign in to comment.