Skip to content

Commit f58542a

Browse files
committed
add xapian build/install
1 parent b6aa195 commit f58542a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/ci-test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,28 @@ jobs:
9797
if [[ "$PYTHON_VERSION" != "2."* ]]; then
9898
pip install Markdown; fi
9999
100+
- name: Install xapian
101+
continue-on-error: true
102+
run: |
103+
sudo apt-get install libxapian-dev
104+
# Sphinx required to build the xapian python bindings. Use 1.8.5 on
105+
# older python and newest on newer.
106+
if [[ $PYTHON_VERSION == "2."* ]]; then pip install sphinx==1.8.5; fi
107+
if [[ $PYTHON_VERSION == '3.'* ]] ; then pip install sphinx; fi
108+
XAPIAN_VER=$(dpkg -l libxapian-dev | tail -n 1 | awk '{print $3}' | cut -d '-' -f 1); echo $XAPIAN_VER
109+
cd /tmp
110+
curl -s -O https://oligarchy.co.uk/xapian/$XAPIAN_VER/xapian-bindings-$XAPIAN_VER.tar.xz
111+
tar -Jxvf xapian-bindings-$XAPIAN_VER.tar.xz
112+
cd xapian-bindings-$XAPIAN_VER/
113+
if [[ $PYTHON_VERSION == "2."* ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python --disable-documentation; fi
114+
# edit the configure script.
115+
# distutils.sysconfig.get_config_vars('SO') doesn't work for
116+
# 3.11 or newer.
117+
# Change distutils.sysconfig... to just sysconfig and SO
118+
# to EXT_SUFFIX to get valid value.
119+
if [[ $PYTHON_VERSION == "3."* ]]; then sed -i -e '/PYTHON3_SO=/s/distutils\.//g' -e '/PYTHON3_SO=/s/"SO"/"EXT_SUFFIX"/g' configure; ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi
120+
case "$PYTHON_VERSION" in nightly) echo skipping xapian build;; *) make && make install; esac
121+
100122
- name: Install pytest and other packages needed for running tests
101123
run: pip install codecov flake8 pytest pytest-cov requests
102124

0 commit comments

Comments
 (0)