#!/bin/bash set -ex -o pipefail pip install -U pip setuptools wheel sudo apt-get install libnetfilter-queue-dev # Cython is required to build the sdist... pip install cython python setup.py sdist --formats=zip # ... but not to install it pip uninstall -y cython pip install dist/*.zip if python --version 2>&1 | fgrep -q "Python 2.7"; then # The testsuite doesn't run on 2.7, so do just a basic smoke test. unshare -Urn python -c "from netfilterqueue import NetfilterQueue as NFQ; NFQ()" exit $? fi pip install -Ur test-requirements.txt if [ "$CHECK_LINT" = "1" ]; then error=0 if ! black --check setup.py tests; then cat <