[PATCH] build: make it compatible with python3 tools
Daniel Vetter
daniel at ffwll.ch
Thu Aug 30 07:01:16 UTC 2018
On Wed, Aug 29, 2018 at 01:15:17PM -0700, Lucas De Marchi wrote:
> sphinx-build and rst2man binaries on Fedora 28 have a -3 suffix when
> they are installed for python3 in order to be able to be installed in
> parallel to the python2's package.
>
> For python3-sphinx, there's a bash module that plugs into /etc/profile.d
> to add /usr/libexec/python3-sphinx to PATH. That however doesn't work
> if you don't reload the profile after you installed the package.
>
> So this makes it simpler by stating that we are compatible with any
> of the tools (and we prefer the one with -3 suffix if available).
> While at it, also allow people to override RST2MAN in the command line
> in case we have even more creative scenarios.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
>
> Daniel, now it's green:
> https://gitlab.freedesktop.org/demarchi/maintainer-tools
\o/
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Since I pushed already, can you pls also do the patch to convert the
.gitlab-ci.yml? And I'll leave pushing to you, since we're moving to
gitlab any minute now.
-Daniel
>
> I applied v2 of your patch on top and everything worked.
>
> Makefile | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index c374f41..5937560 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -9,7 +9,8 @@
>
> # You can set these variables from the command line.
> SPHINXOPTS =
> -SPHINXBUILD = sphinx-build
> +SPHINXBUILD ?= $(shell command -v sphinx-build-3 || command -v sphinx-build)
> +RST2MAN ?= $(shell command -v rst2man-3 || command -v rst2man)
> PAPER =
> BUILDDIR = _build
>
> @@ -56,8 +57,8 @@ mancheck:
> echo "$@: $$cmd not documented"; \
> fi \
> done
> - rst2man --strict --no-raw dim.rst >/dev/null
> - rst2man --strict --no-raw qf.rst >/dev/null
> + $(RST2MAN) --strict --no-raw dim.rst >/dev/null
> + $(RST2MAN) --strict --no-raw qf.rst >/dev/null
>
> check: shellcheck mancheck doccheck
>
> --
> 2.17.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dim-tools
mailing list