Skip to content

Bump lxml to v6.1.0 #768

Bump lxml to v6.1.0

Bump lxml to v6.1.0 #768

Workflow file for this run

name: linuxbrew
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'master' }}
jobs:
linuxbrew:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
env:
# For some unknown reason, linuxbrew tries to use "gcc-11" by default, which doesn't exist.
CC: gcc
steps:
- uses: actions/checkout@v3
- name: Install brew
run: |
sudo apt install -y build-essential procps curl file git
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
- name: Install build dependencies
run: |
brew update
brew install python@${{ matrix.python }} gcc libxml2 libxslt libxmlsec1 pkg-config
echo "/home/linuxbrew/.linuxbrew/opt/python@${{ matrix.python }}/libexec/bin" >> $GITHUB_PATH
- name: Configure Homebrew XML toolchain
run: |
echo "PKG_CONFIG_PATH=$(brew --prefix libxml2)/lib/pkgconfig:$(brew --prefix libxslt)/lib/pkgconfig" >> $GITHUB_ENV
echo "CPPFLAGS=-I$(brew --prefix libxml2)/include -I$(brew --prefix libxslt)/include" >> $GITHUB_ENV
echo "CFLAGS=-I$(brew --prefix libxml2)/include -I$(brew --prefix libxslt)/include" >> $GITHUB_ENV
echo "LDFLAGS=-L$(brew --prefix libxml2)/lib -L$(brew --prefix libxslt)/lib" >> $GITHUB_ENV
echo "$(brew --prefix libxml2)/bin" >> $GITHUB_PATH
echo "$(brew --prefix libxslt)/bin" >> $GITHUB_PATH
- name: Build wheel
run: |
python3 -m venv build_venv
source build_venv/bin/activate
pip3 install --upgrade setuptools wheel build
python3 -m build
rm -rf build/
- name: Run tests
run: |
python3 -m venv test_venv
source test_venv/bin/activate
pip3 install --upgrade --no-binary=lxml -r requirements-test.txt
pip3 install xmlsec --only-binary=xmlsec --no-index --find-links=dist/
echo "PATH=$PATH"
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
echo "CPPFLAGS=$CPPFLAGS"
echo "CFLAGS=$CFLAGS"
echo "LDFLAGS=$LDFLAGS"
brew list --versions libxml2 libxslt libxmlsec1 openssl@3 pkg-config python@${{ matrix.python }}
xml2-config --version || true
xslt-config --version || true
xmlsec1 --version || true
pkg-config --modversion libxml-2.0 libxslt xmlsec1
pkg-config --modversion openssl || true
python3 - <<'PY'
import lxml.etree
import xmlsec
print('lxml.LIBXML_VERSION', lxml.etree.LIBXML_VERSION)
print('lxml.LIBXML_COMPILED_VERSION', lxml.etree.LIBXML_COMPILED_VERSION)
print('lxml.LIBXSLT_VERSION', lxml.etree.LIBXSLT_VERSION)
print('lxml.LIBXSLT_COMPILED_VERSION', lxml.etree.LIBXSLT_COMPILED_VERSION)
print('xmlsec.__file__', xmlsec.__file__)
print('xmlsec.get_libxml_version()', xmlsec.get_libxml_version())
print('xmlsec.get_libxml_compiled_version()', xmlsec.get_libxml_compiled_version())
print('xmlsec.get_libxmlsec_version()', xmlsec.get_libxmlsec_version())
print('lxml.etree.__file__', lxml.etree.__file__)
PY
ldd "$(python3 - <<'PY'
import lxml.etree
print(lxml.etree.__file__)
PY
)"
ldd "$(python3 - <<'PY'
import xmlsec
print(xmlsec.__file__)
PY
)"
pytest -v --color=yes