Mercurial > p > roundup > code
diff .github/workflows/ci-test.yml @ 7628:88c13f6dbc95
build: try 3.12 xapian build again.
Well configure needs to be taught not to use imp library under 3.12
as imp doesn't exist anymore.
Update sed script for configure to make the required modifications.
This should work going back to 3.6 as the replacement:
imp.gettag() -> sys.implementation.cache_tag
imp.util.cache_from_source -> importlib.util.cache_from_source
works in 3.6.9 at least and doc claims they were introduced in
3.2/3.4.
Geesh what a pain. Good thing there was a dockerfile with 3.12rc2 I
could use to debug this.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 11 Sep 2023 03:11:46 -0400 |
| parents | bcf99a62deca |
| children | bad8affdcba7 |
line wrap: on
line diff
--- a/.github/workflows/ci-test.yml Mon Sep 11 02:09:55 2023 -0400 +++ b/.github/workflows/ci-test.yml Mon Sep 11 03:11:46 2023 -0400 @@ -204,8 +204,17 @@ # 3.11 or newer. # Change distutils.sysconfig... to just sysconfig and SO # to EXT_SUFFIX to get valid value. - 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 - case "$PYTHON_VERSION" in nightly|3.12*) echo skipping xapian build;; *) make && sudo make install; esac + if [[ $PYTHON_VERSION == "3."* ]]; then \ + sed -i \ + -e '/PYTHON3_SO=/s/distutils\.//g' \ + -e '/PYTHON3_SO=/s/"SO"/"EXT_SUFFIX"/g' \ + -e '/PYTHON3_CACHE_TAG=/s/imp;print(imp.get_tag())/sys;print(sys.implementation.cache_tag)/' \ + -e '/PYTHON3_CACHE_OPT1_EXT=/s/imp\.get_tag()/sys.implementation.cache_tag/g' \ + -e '/PYTHON3_CACHE_OPT1_EXT=/s/imp\b/importlib/' \ + configure; \ + ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; \ + fi + case "$PYTHON_VERSION" in nightly) echo skipping xapian build;; *) make && sudo make install; esac - name: Install pytest and other packages needed for running tests run: pip install flake8 mock pytest pytest-cov requests
