Skip to content

Commit 0ba7c5e

Browse files
committed
Try to fix install failure for xapian on 3.11-dev and newer.
distutils.sysconfig.get_config_vars('SO') is returning None on these platforms. Use: sysconfig.get_config_vars('SO') instead. This works with my 3.6 install, so hopefully will work with all of the 3.x releases we have.
1 parent eac6a4a commit 0ba7c5e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.travis.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,14 @@ before_install:
6666
- cd xapian-bindings-$XAPIAN_VER/
6767
- echo $TRAVIS_PYTHON_VERSION
6868
- if [[ $TRAVIS_PYTHON_VERSION == "2."* ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python --disable-documentation; fi
69-
- if [[ $TRAVIS_PYTHON_VERSION == "3."* ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi
70-
- if [[ $TRAVIS_PYTHON_VERSION == "nightly" ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi
71-
- if [[ $TRAVIS_PYTHON_VERSION == "pypy3" ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi
72-
- case "$TRAVIS_PYTHON_VERSION" in nightly|3.11-dev) echo skipping xapian build;; *) make && make install; esac
69+
# edit the configure script. distutils.sysconfig.get_config_vars('SO')
70+
# doesn't work for 3.11 or newer.
71+
# Change distutils.sysconfig... to just sysconfig to get valid SO.
72+
- if [[ $TRAVIS_PYTHON_VERSION == "3."* ]]; then sed -i '/PYTHON3_SO=/s/distutils.//g' configure; ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi
73+
- if [[ $TRAVIS_PYTHON_VERSION == "nightly" ]]; then sed -i '/PYTHON3_SO=/s/distutils.//g' configure; ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi
74+
- if [[ $TRAVIS_PYTHON_VERSION == "pypy3" ]]; then sed -i '/PYTHON3_SO=/s/distutils.//g' configure; ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi
75+
# - case "$TRAVIS_PYTHON_VERSION" in nightly|3.11-dev) echo skipping xapian build;; *) make && make install; esac
76+
- make && make install; esac
7377

7478
- PATH=$VIRTUAL_ENV/bin:$PATH
7579

0 commit comments

Comments
 (0)