# HG changeset patch # User John Rouillard # Date 1655961898 14400 # Node ID c6dc2e8d59a8df06b0b2ef83675531db54645cb7 # Parent 9db9687d9433ea88cad47f6a23b77378f9e40a17 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. diff -r 9db9687d9433 -r c6dc2e8d59a8 .travis.yml --- a/.travis.yml Thu Jun 23 00:33:33 2022 -0400 +++ b/.travis.yml Thu Jun 23 01:24:58 2022 -0400 @@ -66,10 +66,14 @@ - cd xapian-bindings-$XAPIAN_VER/ - echo $TRAVIS_PYTHON_VERSION - if [[ $TRAVIS_PYTHON_VERSION == "2."* ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python --disable-documentation; fi - - if [[ $TRAVIS_PYTHON_VERSION == "3."* ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi - - if [[ $TRAVIS_PYTHON_VERSION == "nightly" ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi - - if [[ $TRAVIS_PYTHON_VERSION == "pypy3" ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi - - case "$TRAVIS_PYTHON_VERSION" in nightly|3.11-dev) echo skipping xapian build;; *) make && make install; esac + # edit the configure script. distutils.sysconfig.get_config_vars('SO') + # doesn't work for 3.11 or newer. + # Change distutils.sysconfig... to just sysconfig to get valid SO. + - if [[ $TRAVIS_PYTHON_VERSION == "3."* ]]; then sed -i '/PYTHON3_SO=/s/distutils.//g' configure; ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi + - if [[ $TRAVIS_PYTHON_VERSION == "nightly" ]]; then sed -i '/PYTHON3_SO=/s/distutils.//g' configure; ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi + - if [[ $TRAVIS_PYTHON_VERSION == "pypy3" ]]; then sed -i '/PYTHON3_SO=/s/distutils.//g' configure; ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi + # - case "$TRAVIS_PYTHON_VERSION" in nightly|3.11-dev) echo skipping xapian build;; *) make && make install; esac + - make && make install; esac - PATH=$VIRTUAL_ENV/bin:$PATH