Opened 6 years ago
Closed 6 years ago
#778 closed defect (fixed)
Sphinx version 2 blocks xapian-bindings compilation
Reported by: | karolyi | Owned by: | Olly Betts |
---|---|---|---|
Priority: | high | Milestone: | 1.4.12 |
Component: | Xapian-bindings (Python) | Version: | 1.4.11 |
Severity: | critical | Keywords: | python xapian-bindings python3 |
Cc: | Blocked By: | ||
Blocking: | Operating System: | All |
Description
Sphinx 2.x got released in Feb 27 2019. Since the xapian-bindings compilation for python uses a non-versioned Sphinx, the configure command fails because the sphinx module doesn't have a main() property anymore.
Change History (10)
follow-up: 2 comment:1 by , 6 years ago
comment:2 by , 6 years ago
Replying to olly:
You seem eager to get this fixed in the next release - providing a patch (ideally one which still leaves things working with older Sphinx too) is the best way to make that happen.
I can give it a try and create a PR on the github repo if that suffices. However, I'll only add the change for python3, since python 2.x is legacy anyways.
Is that okay with you?
comment:3 by , 6 years ago
Our python 2.x support needs to keep working while we have it, but it looks like sphinx 2.0 doesn't support python 2.x anyway (https://www.sphinx-doc.org/en/master/changes.html says "Drop python 2.7 and 3.4 support" for 2.0.0b1) so there's no reason to update it for changes in sphinx 2.0.
Hmm, I also don't see any mention of changes to sphinx.main()
in 2.0 on https://www.sphinx-doc.org/en/master/extdev/deprecated.html#dev-deprecated-apis
comment:4 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Fixed in git master in [7a8f1d479ec26b600eb05525140e4d648cf297c5]. Should be backported for 1.4.12.
comment:5 by , 6 years ago
I'm glad I found this. As of now, the Xapain installation process for Python 3 is basically broken.
Any fix?
comment:7 by , 6 years ago
Changing configure:17286 from if $PYTHON3 -c 'import sphinx;print(repr(sphinx.main))' >&5 2>&5 ; then
to if $PYTHON3 -c 'from sphinx.cmd.build import main;print(repr(main))' >&5 2>&5 ; then
may work.
comment:8 by , 6 years ago
In the mean time, for anyone finding this, changing pip install sphinx
to pip install -U Sphinx==1.8.5
in install_xapian.sh
allows one to complete the install.
comment:9 by , 6 years ago
What was the last working version of Sphinx?
Whatever the last version before 2.0 was.
This should be fixed in git master, but hand-applying the fix to allow building the latest xapian release is probably not trivial - installing an older sphinx version is a simpler workaround.
There should be new release with a backport of this fix fairly soon.
comment:10 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Follow-on fixes on master: [ba557b0ef09a11f2513a61a7825963dedf45b6f5] [2f51e4d8ddb0d757cf703d7fd412e33dcef765a1]
The CI on macOS is now building python3 and passing, and that uses Sphinx 2.0 from homebrew.
Backported to RELEASE/1.4: [dc07f43c51eb4a70b16245f70615d4326ea67ccc] [98cdd3ee78b417fe1f2dbd3089586ddd2e0fc25e] [14c1801ddeb38e26f3725272f97f0ead851b46e0]
You seem eager to get this fixed in the next release - providing a patch (ideally one which still leaves things working with older Sphinx too) is the best way to make that happen.