apache / buildstream

BuildStream, the software integration tool
https://buildstream.build/
Apache License 2.0
83 stars 28 forks source link

sphinx docs fail on python2-default systems #1

Closed BuildStream-Migration-Bot closed 3 years ago

BuildStream-Migration-Bot commented 3 years ago

See original issue on GitLab In GitLab by [Gitlab user @leeming] on Dec 8, 2016, 16:22

Sphinx runs the default python interrupter for generating the documentation. This is annoying/a problem for systems that default to python2.7 for the python command.

A workaround for this is to make a copy of the sphinx-build script from /usr/bin and change the header to explicitly call python 3. Alternatively create an additional script for this case and change the following in the Makefile

SPHINXBUILD = sphinx-build

As per http://stackoverflow.com/questions/8015225/how-to-force-sphinx-to-use-python-3-x-interpreter

#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Same as /usr/bin/sphinx-build but with different
interpreter
"""

import sys

if __name__ == '__main__':
    from sphinx import main, make_main
    if sys.argv[1:2] == ['-M']:
        sys.exit(make_main(sys.argv))
    else:
        sys.exit(main(sys.argv))

I could not find an obvious and nice work around for this, thus the issue instead of a PR

BuildStream-Migration-Bot commented 3 years ago

In GitLab by [Gitlab user @leeming] on Dec 15, 2016, 12:28

mentioned in commit ab1d461b13adeb3a87718b58ac5aeebb19fa5981

BuildStream-Migration-Bot commented 3 years ago

In GitLab by [Gitlab user @leeming] on Jan 4, 2017, 09:16

mentioned in merge request !10

BuildStream-Migration-Bot commented 3 years ago

In GitLab by [Gitlab user @tristanvb] on Apr 29, 2017, 07:11

This was fixed by merge request !10 months ago.

BuildStream-Migration-Bot commented 3 years ago

In GitLab by [Gitlab user @tristanvb] on Apr 29, 2017, 07:11

closed

BuildStream-Migration-Bot commented 3 years ago

In GitLab by [Gitlab user @raoul].hidalgocharman on Apr 8, 2019, 18:03

mentioned in commit 108c3147bb627f34129b40bd20612e3871edc68b

BuildStream-Migration-Bot commented 3 years ago

In GitLab by [Gitlab user @raoul].hidalgocharman on Apr 9, 2019, 10:23

mentioned in commit 295cdc645b576cd6210d361b9a482f727f3220d7

BuildStream-Migration-Bot commented 3 years ago

In GitLab by [Gitlab user @raoul].hidalgocharman on Apr 9, 2019, 11:44

mentioned in commit f80d445a07acd8d40e602c9fcfad1780977cce5d

BuildStream-Migration-Bot commented 3 years ago

In GitLab by [Gitlab user @raoul].hidalgocharman on Apr 10, 2019, 17:45

mentioned in commit 9bbf9dd93e271815c3d219e274e3acfd9ec6c3b8