All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3
@ 2018-09-05 18:43 Lucas De Marchi
  2018-09-05 19:36 ` [igt-dev] ✓ Fi.CI.BAT: success for build: allow to use rst2man from python3 (rev2) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Lucas De Marchi @ 2018-09-05 18:43 UTC (permalink / raw)
  To: igt-dev

While changing maintainer-tools to allow to use python3 I unsintalled my
python2 tools, which broke IGT build for me. Allow to use either
rst2man-3 or rst2man.

v2: remove changes to autotools

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 man/meson.build | 4 ++--
 man/rst2man.sh  | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/man/meson.build b/man/meson.build
index fa01f9dd..a6b08900 100644
--- a/man/meson.build
+++ b/man/meson.build
@@ -22,14 +22,14 @@ defs_rst = configure_file(input : 'defs.rst.in',
 		output : 'defs.rst',
 		configuration : config)
 
-rst2man = find_program('rst2man', required : _man_required)
+rst2man = find_program('rst2man-3', 'rst2man', required : _man_required)
 rst2man_script = find_program('rst2man.sh')
 
 if _build_man and rst2man.found()
 	foreach manpage : manpages
 		custom_target(manpage + '.1',
 				build_by_default : true,
-				command : [ rst2man_script, '@INPUT@', '@OUTPUT@' ],
+				command : [ rst2man_script, rst2man, '@INPUT@', '@OUTPUT@' ],
 				depend_files : [ defs_rst ],
 				input: manpage + '.rst',
 				output : manpage + '.1.gz',
diff --git a/man/rst2man.sh b/man/rst2man.sh
index 8106ca4b..49a98fc5 100755
--- a/man/rst2man.sh
+++ b/man/rst2man.sh
@@ -1,7 +1,8 @@
 #!/bin/bash
 
-input=$1
-output=$2
+rst2man=$1
+input=$2
+output=$3
 
 out_dir=$(dirname "${output}")
 in_file=$(basename "${input}")
@@ -10,7 +11,7 @@ in_file=$(basename "${input}")
 # generated we first need to move it all into the build dir
 cp "$input" "$out_dir"
 
-rst2man "$out_dir/$in_file" "${output%.gz}"
+${rst2man} "$out_dir/$in_file" "${output%.gz}"
 
 rm -f "${output}"
 gzip "${output%.gz}"
-- 
2.17.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for build: allow to use rst2man from python3 (rev2)
  2018-09-05 18:43 [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3 Lucas De Marchi
@ 2018-09-05 19:36 ` Patchwork
  2018-09-06  2:24 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2018-09-06  6:06 ` [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3 Jani Nikula
  2 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2018-09-05 19:36 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: igt-dev

== Series Details ==

Series: build: allow to use rst2man from python3 (rev2)
URL   : https://patchwork.freedesktop.org/series/49020/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4772 -> IGTPW_1794 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/49020/revisions/2/mbox/

== Known issues ==

  Here are the changes found in IGTPW_1794 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@debugfs_test@read_all_entries:
      fi-snb-2520m:       PASS -> INCOMPLETE (fdo#103713)

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       PASS -> DMESG-WARN (fdo#102614)
      fi-byt-clapper:     PASS -> FAIL (fdo#103167)

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
      fi-byt-clapper:     PASS -> FAIL (fdo#103191, fdo#107362)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         PASS -> INCOMPLETE (fdo#103927)

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         PASS -> FAIL (fdo#104008)

    
    ==== Possible fixes ====

    igt@gem_exec_suspend@basic-s4-devices:
      fi-kbl-7500u:       DMESG-WARN (fdo#105128, fdo#107139) -> PASS

    igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
      fi-ilk-650:         DMESG-WARN (fdo#106387) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-byt-clapper:     FAIL (fdo#103191, fdo#107362) -> PASS

    
  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
  fdo#106387 https://bugs.freedesktop.org/show_bug.cgi?id=106387
  fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362


== Participating hosts (54 -> 48) ==

  Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 


== Build changes ==

    * IGT: IGT_4629 -> IGTPW_1794

  CI_DRM_4772: 1351ee8f3aacdb8f4a71cd17a7035556065c59a9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1794: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1794/
  IGT_4629: c3b6d69aa3dd2d1a6c1f2e787670a0aef78f2ea5 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1794/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for build: allow to use rst2man from python3 (rev2)
  2018-09-05 18:43 [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3 Lucas De Marchi
  2018-09-05 19:36 ` [igt-dev] ✓ Fi.CI.BAT: success for build: allow to use rst2man from python3 (rev2) Patchwork
@ 2018-09-06  2:24 ` Patchwork
  2018-09-06  6:06 ` [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3 Jani Nikula
  2 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2018-09-06  2:24 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: igt-dev

== Series Details ==

Series: build: allow to use rst2man from python3 (rev2)
URL   : https://patchwork.freedesktop.org/series/49020/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4629_full -> IGTPW_1794_full =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/49020/revisions/2/mbox/

== Known issues ==

  Here are the changes found in IGTPW_1794_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@shrink:
      shard-glk:          PASS -> FAIL (fdo#106886)

    igt@gem_exec_big:
      shard-hsw:          PASS -> INCOMPLETE (fdo#103540)

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
      shard-glk:          PASS -> FAIL (fdo#103167) +2

    
    ==== Possible fixes ====

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-kbl:          INCOMPLETE (fdo#103665, fdo#106023) -> PASS

    igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
      shard-glk:          FAIL (fdo#105363) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-plflip-blt:
      shard-glk:          FAIL (fdo#103167) -> PASS

    igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
      shard-apl:          FAIL (fdo#103375) -> PASS

    igt@perf_pmu@rc6-runtime-pm:
      shard-kbl:          FAIL (fdo#105010) -> PASS

    igt@prime_busy@before-bsd1:
      shard-snb:          INCOMPLETE (fdo#105411) -> SKIP

    
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
  fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#105010 https://bugs.freedesktop.org/show_bug.cgi?id=105010
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
  fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * IGT: IGT_4629 -> IGTPW_1794
    * Linux: CI_DRM_4770 -> CI_DRM_4772

  CI_DRM_4770: 0c3535cf60140d017a5df73d84d06e8b1a5b5d3b @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_4772: 1351ee8f3aacdb8f4a71cd17a7035556065c59a9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1794: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1794/
  IGT_4629: c3b6d69aa3dd2d1a6c1f2e787670a0aef78f2ea5 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1794/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3
  2018-09-05 18:43 [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3 Lucas De Marchi
  2018-09-05 19:36 ` [igt-dev] ✓ Fi.CI.BAT: success for build: allow to use rst2man from python3 (rev2) Patchwork
  2018-09-06  2:24 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2018-09-06  6:06 ` Jani Nikula
  2018-09-06  7:20   ` Lucas De Marchi
  2 siblings, 1 reply; 15+ messages in thread
From: Jani Nikula @ 2018-09-06  6:06 UTC (permalink / raw)
  To: Lucas De Marchi, igt-dev

On Wed, 05 Sep 2018, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> While changing maintainer-tools to allow to use python3 I unsintalled my
> python2 tools, which broke IGT build for me. Allow to use either
> rst2man-3 or rst2man.
>
> v2: remove changes to autotools
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

I guess after all my nitpicking, an

Acked-by: Jani Nikula <jani.nikula@intel.com>

is in order.

Side note, if I install sphinx and docutils within a 'python3 -m venv'
virtual environment, the rst2man executable is called rst2man.py...

BR,
Jani.


> ---
>  man/meson.build | 4 ++--
>  man/rst2man.sh  | 7 ++++---
>  2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/man/meson.build b/man/meson.build
> index fa01f9dd..a6b08900 100644
> --- a/man/meson.build
> +++ b/man/meson.build
> @@ -22,14 +22,14 @@ defs_rst = configure_file(input : 'defs.rst.in',
>  		output : 'defs.rst',
>  		configuration : config)
>  
> -rst2man = find_program('rst2man', required : _man_required)
> +rst2man = find_program('rst2man-3', 'rst2man', required : _man_required)
>  rst2man_script = find_program('rst2man.sh')
>  
>  if _build_man and rst2man.found()
>  	foreach manpage : manpages
>  		custom_target(manpage + '.1',
>  				build_by_default : true,
> -				command : [ rst2man_script, '@INPUT@', '@OUTPUT@' ],
> +				command : [ rst2man_script, rst2man, '@INPUT@', '@OUTPUT@' ],
>  				depend_files : [ defs_rst ],
>  				input: manpage + '.rst',
>  				output : manpage + '.1.gz',
> diff --git a/man/rst2man.sh b/man/rst2man.sh
> index 8106ca4b..49a98fc5 100755
> --- a/man/rst2man.sh
> +++ b/man/rst2man.sh
> @@ -1,7 +1,8 @@
>  #!/bin/bash
>  
> -input=$1
> -output=$2
> +rst2man=$1
> +input=$2
> +output=$3
>  
>  out_dir=$(dirname "${output}")
>  in_file=$(basename "${input}")
> @@ -10,7 +11,7 @@ in_file=$(basename "${input}")
>  # generated we first need to move it all into the build dir
>  cp "$input" "$out_dir"
>  
> -rst2man "$out_dir/$in_file" "${output%.gz}"
> +${rst2man} "$out_dir/$in_file" "${output%.gz}"
>  
>  rm -f "${output}"
>  gzip "${output%.gz}"

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3
  2018-09-06  6:06 ` [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3 Jani Nikula
@ 2018-09-06  7:20   ` Lucas De Marchi
  0 siblings, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2018-09-06  7:20 UTC (permalink / raw)
  To: Jani Nikula; +Cc: igt-dev

On Thu, Sep 06, 2018 at 09:06:37AM +0300, Jani Nikula wrote:
> On Wed, 05 Sep 2018, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> > While changing maintainer-tools to allow to use python3 I unsintalled my
> > python2 tools, which broke IGT build for me. Allow to use either
> > rst2man-3 or rst2man.
> >
> > v2: remove changes to autotools
> >
> > Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> 
> I guess after all my nitpicking, an
> 
> Acked-by: Jani Nikula <jani.nikula@intel.com>
> 
> is in order.

thanks

> 
> Side note, if I install sphinx and docutils within a 'python3 -m venv'
> virtual environment, the rst2man executable is called rst2man.py...

yep, that's what I wrote about installing via pip. upstream docutils
decided to maintain a .py extension, but that goes against the rules of
several distros. So distros have a gazillion-lines
scripts/install-rules to conform the package final installation to what
they prefer.

We document that people should install rst2man as a distro package,
so I don't know if we should add yet another variant for the binary name. Or
just be lazy and wait someone to complain...

Lucas De Marchi

> 
> BR,
> Jani.
> 
> 
> > ---
> >  man/meson.build | 4 ++--
> >  man/rst2man.sh  | 7 ++++---
> >  2 files changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/man/meson.build b/man/meson.build
> > index fa01f9dd..a6b08900 100644
> > --- a/man/meson.build
> > +++ b/man/meson.build
> > @@ -22,14 +22,14 @@ defs_rst = configure_file(input : 'defs.rst.in',
> >  		output : 'defs.rst',
> >  		configuration : config)
> >  
> > -rst2man = find_program('rst2man', required : _man_required)
> > +rst2man = find_program('rst2man-3', 'rst2man', required : _man_required)
> >  rst2man_script = find_program('rst2man.sh')
> >  
> >  if _build_man and rst2man.found()
> >  	foreach manpage : manpages
> >  		custom_target(manpage + '.1',
> >  				build_by_default : true,
> > -				command : [ rst2man_script, '@INPUT@', '@OUTPUT@' ],
> > +				command : [ rst2man_script, rst2man, '@INPUT@', '@OUTPUT@' ],
> >  				depend_files : [ defs_rst ],
> >  				input: manpage + '.rst',
> >  				output : manpage + '.1.gz',
> > diff --git a/man/rst2man.sh b/man/rst2man.sh
> > index 8106ca4b..49a98fc5 100755
> > --- a/man/rst2man.sh
> > +++ b/man/rst2man.sh
> > @@ -1,7 +1,8 @@
> >  #!/bin/bash
> >  
> > -input=$1
> > -output=$2
> > +rst2man=$1
> > +input=$2
> > +output=$3
> >  
> >  out_dir=$(dirname "${output}")
> >  in_file=$(basename "${input}")
> > @@ -10,7 +11,7 @@ in_file=$(basename "${input}")
> >  # generated we first need to move it all into the build dir
> >  cp "$input" "$out_dir"
> >  
> > -rst2man "$out_dir/$in_file" "${output%.gz}"
> > +${rst2man} "$out_dir/$in_file" "${output%.gz}"
> >  
> >  rm -f "${output}"
> >  gzip "${output%.gz}"
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3
  2018-09-04 18:35         ` Daniel Vetter
@ 2018-09-05  9:06           ` Petri Latvala
  0 siblings, 0 replies; 15+ messages in thread
From: Petri Latvala @ 2018-09-05  9:06 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: IGT development, Lucas De Marchi

On Tue, Sep 04, 2018 at 08:35:52PM +0200, Daniel Vetter wrote:
> On Tue, Sep 4, 2018 at 6:05 PM, Lucas De Marchi
> <lucas.demarchi@intel.com> wrote:
> > On Tue, Sep 04, 2018 at 09:00:04AM -0700, Lucas De Marchi wrote:
> >> On Tue, Sep 04, 2018 at 02:10:43PM +0200, Daniel Vetter wrote:
> >> > On Tue, Sep 4, 2018 at 1:56 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> >> > > On Fri, 31 Aug 2018, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> >> > >> While changing maintainer-tools to allow to use python3 I unsintalled my
> >> > >> python2 tools, which broke IGT build for me. Allow to use either
> >> > >> rst2man-3 or rst2man.
> >> > >>
> >> > >> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> >> > >> ---
> >> > >>  configure.ac    | 4 ++--
> >> > >>  man/Makefile.am | 2 +-
> >> > >>  man/meson.build | 4 ++--
> >> > >>  man/rst2man.sh  | 7 ++++---
> >> > >>  4 files changed, 9 insertions(+), 8 deletions(-)
> >> > >>
> >> > >> diff --git a/configure.ac b/configure.ac
> >> > >> index c75ef284..bcd24f04 100644
> >> > >> --- a/configure.ac
> >> > >> +++ b/configure.ac
> >> > >> @@ -52,8 +52,8 @@ enable_gtk_doc=no
> >> > >>  ])
> >> > >>
> >> > >>  # check for rst2man for generating man pages
> >> > >> -AC_CHECK_PROG(RST2MAN, rst2man, yes, no)
> >> > >> -AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = xyes])
> >> > >> +AC_CHECK_PROGS(RST2MAN, rst2man-3 rst2man, "")
> >> > >> +AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = x])
> >> > >
> >> > > Is this ugliness what Fedora recommends upstreams all over do to
> >> > > workaround their package management decisions? Yuck.
> >> >
> >> > Use meson (where it's a one-liner). Still meh, but not longer yuck I think :-)
> >> >
> >> > More seriously, do we really care about fixing these kind of things on
> >> > the old automake build system? I'd say just keep it as-is (and only
> >>
> >> Last time I tried[1], Antonio complained about no support for Automake,
> >> Chris ranted that I was "forcing a broken build system that doesn't even
> >> dare to declare itself stable".  Tvrtko said it is important to support
> >> both until autotools is removed. I waited some time to see if any other
> >> maintainer chimed in and then gave up. Now I go with "my life is miserable
> >> and I will update 2 build systems".
> >
> > missed link:
> > https://lists.freedesktop.org/archives/igt-dev/2018-July/004483.html
> 
> I think this is different: Without automake support on this you
> essentially break automake (by making liberal use of a syscall that
> might not exist).
> 
> This here is different: Lack of the python3 alternative won't break
> automake on old/existing systems that want to compile latest igt.
> 
> At least that's my take. tldr;
> - If it's a build system only improvement, ignore automake (as long as
> you don't break it)
> - if it's a change required by new tests/ or lib/ source code, update both.
> 
> Arek/Petri?


Yeah, this matches my expectations as well. Indeed, the memfd_create
change was causing autotools builds to fail _entirely_, an important
distinction.

Only thing keeping us from nuking autotools at this point is
supporting some developers *cough* who still need to build tests with
autotools, and distros who still sometimes want to build tools with
it. CI still (afaik) builds docs with autotools, but that's changing
soon to happen at gitlab directly, at which point we can start by
stripping the support for building docs and man pages with autotools.

Rest follows in a hopefully not-so-distant future. For now the thumb
rules Daniel listed above are the ones to follow.


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3
  2018-09-04 16:05       ` Lucas De Marchi
@ 2018-09-04 18:35         ` Daniel Vetter
  2018-09-05  9:06           ` Petri Latvala
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2018-09-04 18:35 UTC (permalink / raw)
  To: Lucas De Marchi, Arkadiusz Hiler, Petri Latvala; +Cc: IGT development

On Tue, Sep 4, 2018 at 6:05 PM, Lucas De Marchi
<lucas.demarchi@intel.com> wrote:
> On Tue, Sep 04, 2018 at 09:00:04AM -0700, Lucas De Marchi wrote:
>> On Tue, Sep 04, 2018 at 02:10:43PM +0200, Daniel Vetter wrote:
>> > On Tue, Sep 4, 2018 at 1:56 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>> > > On Fri, 31 Aug 2018, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
>> > >> While changing maintainer-tools to allow to use python3 I unsintalled my
>> > >> python2 tools, which broke IGT build for me. Allow to use either
>> > >> rst2man-3 or rst2man.
>> > >>
>> > >> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
>> > >> ---
>> > >>  configure.ac    | 4 ++--
>> > >>  man/Makefile.am | 2 +-
>> > >>  man/meson.build | 4 ++--
>> > >>  man/rst2man.sh  | 7 ++++---
>> > >>  4 files changed, 9 insertions(+), 8 deletions(-)
>> > >>
>> > >> diff --git a/configure.ac b/configure.ac
>> > >> index c75ef284..bcd24f04 100644
>> > >> --- a/configure.ac
>> > >> +++ b/configure.ac
>> > >> @@ -52,8 +52,8 @@ enable_gtk_doc=no
>> > >>  ])
>> > >>
>> > >>  # check for rst2man for generating man pages
>> > >> -AC_CHECK_PROG(RST2MAN, rst2man, yes, no)
>> > >> -AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = xyes])
>> > >> +AC_CHECK_PROGS(RST2MAN, rst2man-3 rst2man, "")
>> > >> +AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = x])
>> > >
>> > > Is this ugliness what Fedora recommends upstreams all over do to
>> > > workaround their package management decisions? Yuck.
>> >
>> > Use meson (where it's a one-liner). Still meh, but not longer yuck I think :-)
>> >
>> > More seriously, do we really care about fixing these kind of things on
>> > the old automake build system? I'd say just keep it as-is (and only
>>
>> Last time I tried[1], Antonio complained about no support for Automake,
>> Chris ranted that I was "forcing a broken build system that doesn't even
>> dare to declare itself stable".  Tvrtko said it is important to support
>> both until autotools is removed. I waited some time to see if any other
>> maintainer chimed in and then gave up. Now I go with "my life is miserable
>> and I will update 2 build systems".
>
> missed link:
> https://lists.freedesktop.org/archives/igt-dev/2018-July/004483.html

I think this is different: Without automake support on this you
essentially break automake (by making liberal use of a syscall that
might not exist).

This here is different: Lack of the python3 alternative won't break
automake on old/existing systems that want to compile latest igt.

At least that's my take. tldr;
- If it's a build system only improvement, ignore automake (as long as
you don't break it)
- if it's a change required by new tests/ or lib/ source code, update both.

Arek/Petri?
-Daniel

>
> Lucas De Marchi
>
>>
>> Lucas De Marchi
>>
>> > build-test with python2 for automake, and both python2&3 with meson).
>> > -Daniel
>> >
>> >
>> > >
>> > > BR,
>> > > Jani.
>> > >
>> > >>
>> > >>  # Checks for functions, headers, structures, etc.
>> > >>  AC_HEADER_STDC
>> > >> diff --git a/man/Makefile.am b/man/Makefile.am
>> > >> index 777f5d1f..6b357b11 100644
>> > >> --- a/man/Makefile.am
>> > >> +++ b/man/Makefile.am
>> > >> @@ -42,4 +42,4 @@ defs.rst:
>> > >>       $(AM_V_GEN)echo ".. |MANUAL_GROUP| replace:: General Commands Manual" >> $@
>> > >>
>> > >>  %.$(APP_MAN_SUFFIX): %.rst defs.rst
>> > >> -     $(AM_V_GEN)rst2man < $< > $@
>> > >> +     $(AM_V_GEN)$(RST2MAN) < $< > $@
>> > >> diff --git a/man/meson.build b/man/meson.build
>> > >> index fa01f9dd..a6b08900 100644
>> > >> --- a/man/meson.build
>> > >> +++ b/man/meson.build
>> > >> @@ -22,14 +22,14 @@ defs_rst = configure_file(input : 'defs.rst.in',
>> > >>               output : 'defs.rst',
>> > >>               configuration : config)
>> > >>
>> > >> -rst2man = find_program('rst2man', required : _man_required)
>> > >> +rst2man = find_program('rst2man-3', 'rst2man', required : _man_required)
>> > >>  rst2man_script = find_program('rst2man.sh')
>> > >>
>> > >>  if _build_man and rst2man.found()
>> > >>       foreach manpage : manpages
>> > >>               custom_target(manpage + '.1',
>> > >>                               build_by_default : true,
>> > >> -                             command : [ rst2man_script, '@INPUT@', '@OUTPUT@' ],
>> > >> +                             command : [ rst2man_script, rst2man, '@INPUT@', '@OUTPUT@' ],
>> > >>                               depend_files : [ defs_rst ],
>> > >>                               input: manpage + '.rst',
>> > >>                               output : manpage + '.1.gz',
>> > >> diff --git a/man/rst2man.sh b/man/rst2man.sh
>> > >> index 8106ca4b..49a98fc5 100755
>> > >> --- a/man/rst2man.sh
>> > >> +++ b/man/rst2man.sh
>> > >> @@ -1,7 +1,8 @@
>> > >>  #!/bin/bash
>> > >>
>> > >> -input=$1
>> > >> -output=$2
>> > >> +rst2man=$1
>> > >> +input=$2
>> > >> +output=$3
>> > >>
>> > >>  out_dir=$(dirname "${output}")
>> > >>  in_file=$(basename "${input}")
>> > >> @@ -10,7 +11,7 @@ in_file=$(basename "${input}")
>> > >>  # generated we first need to move it all into the build dir
>> > >>  cp "$input" "$out_dir"
>> > >>
>> > >> -rst2man "$out_dir/$in_file" "${output%.gz}"
>> > >> +${rst2man} "$out_dir/$in_file" "${output%.gz}"
>> > >>
>> > >>  rm -f "${output}"
>> > >>  gzip "${output%.gz}"
>> > >
>> > > --
>> > > Jani Nikula, Intel Open Source Graphics Center
>> > > _______________________________________________
>> > > igt-dev mailing list
>> > > igt-dev@lists.freedesktop.org
>> > > https://lists.freedesktop.org/mailman/listinfo/igt-dev
>> >
>> >
>> >
>> > --
>> > Daniel Vetter
>> > Software Engineer, Intel Corporation
>> > +41 (0) 79 365 57 48 - http://blog.ffwll.ch



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3
  2018-09-04 16:00     ` Lucas De Marchi
@ 2018-09-04 16:05       ` Lucas De Marchi
  2018-09-04 18:35         ` Daniel Vetter
  0 siblings, 1 reply; 15+ messages in thread
From: Lucas De Marchi @ 2018-09-04 16:05 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: IGT development

On Tue, Sep 04, 2018 at 09:00:04AM -0700, Lucas De Marchi wrote:
> On Tue, Sep 04, 2018 at 02:10:43PM +0200, Daniel Vetter wrote:
> > On Tue, Sep 4, 2018 at 1:56 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> > > On Fri, 31 Aug 2018, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> > >> While changing maintainer-tools to allow to use python3 I unsintalled my
> > >> python2 tools, which broke IGT build for me. Allow to use either
> > >> rst2man-3 or rst2man.
> > >>
> > >> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> > >> ---
> > >>  configure.ac    | 4 ++--
> > >>  man/Makefile.am | 2 +-
> > >>  man/meson.build | 4 ++--
> > >>  man/rst2man.sh  | 7 ++++---
> > >>  4 files changed, 9 insertions(+), 8 deletions(-)
> > >>
> > >> diff --git a/configure.ac b/configure.ac
> > >> index c75ef284..bcd24f04 100644
> > >> --- a/configure.ac
> > >> +++ b/configure.ac
> > >> @@ -52,8 +52,8 @@ enable_gtk_doc=no
> > >>  ])
> > >>
> > >>  # check for rst2man for generating man pages
> > >> -AC_CHECK_PROG(RST2MAN, rst2man, yes, no)
> > >> -AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = xyes])
> > >> +AC_CHECK_PROGS(RST2MAN, rst2man-3 rst2man, "")
> > >> +AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = x])
> > >
> > > Is this ugliness what Fedora recommends upstreams all over do to
> > > workaround their package management decisions? Yuck.
> > 
> > Use meson (where it's a one-liner). Still meh, but not longer yuck I think :-)
> > 
> > More seriously, do we really care about fixing these kind of things on
> > the old automake build system? I'd say just keep it as-is (and only
> 
> Last time I tried[1], Antonio complained about no support for Automake,
> Chris ranted that I was "forcing a broken build system that doesn't even
> dare to declare itself stable".  Tvrtko said it is important to support
> both until autotools is removed. I waited some time to see if any other
> maintainer chimed in and then gave up. Now I go with "my life is miserable
> and I will update 2 build systems".

missed link:
https://lists.freedesktop.org/archives/igt-dev/2018-July/004483.html

Lucas De Marchi

> 
> Lucas De Marchi
> 
> > build-test with python2 for automake, and both python2&3 with meson).
> > -Daniel
> > 
> > 
> > >
> > > BR,
> > > Jani.
> > >
> > >>
> > >>  # Checks for functions, headers, structures, etc.
> > >>  AC_HEADER_STDC
> > >> diff --git a/man/Makefile.am b/man/Makefile.am
> > >> index 777f5d1f..6b357b11 100644
> > >> --- a/man/Makefile.am
> > >> +++ b/man/Makefile.am
> > >> @@ -42,4 +42,4 @@ defs.rst:
> > >>       $(AM_V_GEN)echo ".. |MANUAL_GROUP| replace:: General Commands Manual" >> $@
> > >>
> > >>  %.$(APP_MAN_SUFFIX): %.rst defs.rst
> > >> -     $(AM_V_GEN)rst2man < $< > $@
> > >> +     $(AM_V_GEN)$(RST2MAN) < $< > $@
> > >> diff --git a/man/meson.build b/man/meson.build
> > >> index fa01f9dd..a6b08900 100644
> > >> --- a/man/meson.build
> > >> +++ b/man/meson.build
> > >> @@ -22,14 +22,14 @@ defs_rst = configure_file(input : 'defs.rst.in',
> > >>               output : 'defs.rst',
> > >>               configuration : config)
> > >>
> > >> -rst2man = find_program('rst2man', required : _man_required)
> > >> +rst2man = find_program('rst2man-3', 'rst2man', required : _man_required)
> > >>  rst2man_script = find_program('rst2man.sh')
> > >>
> > >>  if _build_man and rst2man.found()
> > >>       foreach manpage : manpages
> > >>               custom_target(manpage + '.1',
> > >>                               build_by_default : true,
> > >> -                             command : [ rst2man_script, '@INPUT@', '@OUTPUT@' ],
> > >> +                             command : [ rst2man_script, rst2man, '@INPUT@', '@OUTPUT@' ],
> > >>                               depend_files : [ defs_rst ],
> > >>                               input: manpage + '.rst',
> > >>                               output : manpage + '.1.gz',
> > >> diff --git a/man/rst2man.sh b/man/rst2man.sh
> > >> index 8106ca4b..49a98fc5 100755
> > >> --- a/man/rst2man.sh
> > >> +++ b/man/rst2man.sh
> > >> @@ -1,7 +1,8 @@
> > >>  #!/bin/bash
> > >>
> > >> -input=$1
> > >> -output=$2
> > >> +rst2man=$1
> > >> +input=$2
> > >> +output=$3
> > >>
> > >>  out_dir=$(dirname "${output}")
> > >>  in_file=$(basename "${input}")
> > >> @@ -10,7 +11,7 @@ in_file=$(basename "${input}")
> > >>  # generated we first need to move it all into the build dir
> > >>  cp "$input" "$out_dir"
> > >>
> > >> -rst2man "$out_dir/$in_file" "${output%.gz}"
> > >> +${rst2man} "$out_dir/$in_file" "${output%.gz}"
> > >>
> > >>  rm -f "${output}"
> > >>  gzip "${output%.gz}"
> > >
> > > --
> > > Jani Nikula, Intel Open Source Graphics Center
> > > _______________________________________________
> > > igt-dev mailing list
> > > igt-dev@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/igt-dev
> > 
> > 
> > 
> > -- 
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > +41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3
  2018-09-04 12:10   ` Daniel Vetter
  2018-09-04 12:23     ` Jani Nikula
@ 2018-09-04 16:00     ` Lucas De Marchi
  2018-09-04 16:05       ` Lucas De Marchi
  1 sibling, 1 reply; 15+ messages in thread
From: Lucas De Marchi @ 2018-09-04 16:00 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: IGT development

On Tue, Sep 04, 2018 at 02:10:43PM +0200, Daniel Vetter wrote:
> On Tue, Sep 4, 2018 at 1:56 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> > On Fri, 31 Aug 2018, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> >> While changing maintainer-tools to allow to use python3 I unsintalled my
> >> python2 tools, which broke IGT build for me. Allow to use either
> >> rst2man-3 or rst2man.
> >>
> >> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> >> ---
> >>  configure.ac    | 4 ++--
> >>  man/Makefile.am | 2 +-
> >>  man/meson.build | 4 ++--
> >>  man/rst2man.sh  | 7 ++++---
> >>  4 files changed, 9 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/configure.ac b/configure.ac
> >> index c75ef284..bcd24f04 100644
> >> --- a/configure.ac
> >> +++ b/configure.ac
> >> @@ -52,8 +52,8 @@ enable_gtk_doc=no
> >>  ])
> >>
> >>  # check for rst2man for generating man pages
> >> -AC_CHECK_PROG(RST2MAN, rst2man, yes, no)
> >> -AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = xyes])
> >> +AC_CHECK_PROGS(RST2MAN, rst2man-3 rst2man, "")
> >> +AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = x])
> >
> > Is this ugliness what Fedora recommends upstreams all over do to
> > workaround their package management decisions? Yuck.
> 
> Use meson (where it's a one-liner). Still meh, but not longer yuck I think :-)
> 
> More seriously, do we really care about fixing these kind of things on
> the old automake build system? I'd say just keep it as-is (and only

Last time I tried[1], Antonio complained about no support for Automake,
Chris ranted that I was "forcing a broken build system that doesn't even
dare to declare itself stable".  Tvrtko said it is important to support
both until autotools is removed. I waited some time to see if any other
maintainer chimed in and then gave up. Now I go with "my life is miserable
and I will update 2 build systems".

Lucas De Marchi

> build-test with python2 for automake, and both python2&3 with meson).
> -Daniel
> 
> 
> >
> > BR,
> > Jani.
> >
> >>
> >>  # Checks for functions, headers, structures, etc.
> >>  AC_HEADER_STDC
> >> diff --git a/man/Makefile.am b/man/Makefile.am
> >> index 777f5d1f..6b357b11 100644
> >> --- a/man/Makefile.am
> >> +++ b/man/Makefile.am
> >> @@ -42,4 +42,4 @@ defs.rst:
> >>       $(AM_V_GEN)echo ".. |MANUAL_GROUP| replace:: General Commands Manual" >> $@
> >>
> >>  %.$(APP_MAN_SUFFIX): %.rst defs.rst
> >> -     $(AM_V_GEN)rst2man < $< > $@
> >> +     $(AM_V_GEN)$(RST2MAN) < $< > $@
> >> diff --git a/man/meson.build b/man/meson.build
> >> index fa01f9dd..a6b08900 100644
> >> --- a/man/meson.build
> >> +++ b/man/meson.build
> >> @@ -22,14 +22,14 @@ defs_rst = configure_file(input : 'defs.rst.in',
> >>               output : 'defs.rst',
> >>               configuration : config)
> >>
> >> -rst2man = find_program('rst2man', required : _man_required)
> >> +rst2man = find_program('rst2man-3', 'rst2man', required : _man_required)
> >>  rst2man_script = find_program('rst2man.sh')
> >>
> >>  if _build_man and rst2man.found()
> >>       foreach manpage : manpages
> >>               custom_target(manpage + '.1',
> >>                               build_by_default : true,
> >> -                             command : [ rst2man_script, '@INPUT@', '@OUTPUT@' ],
> >> +                             command : [ rst2man_script, rst2man, '@INPUT@', '@OUTPUT@' ],
> >>                               depend_files : [ defs_rst ],
> >>                               input: manpage + '.rst',
> >>                               output : manpage + '.1.gz',
> >> diff --git a/man/rst2man.sh b/man/rst2man.sh
> >> index 8106ca4b..49a98fc5 100755
> >> --- a/man/rst2man.sh
> >> +++ b/man/rst2man.sh
> >> @@ -1,7 +1,8 @@
> >>  #!/bin/bash
> >>
> >> -input=$1
> >> -output=$2
> >> +rst2man=$1
> >> +input=$2
> >> +output=$3
> >>
> >>  out_dir=$(dirname "${output}")
> >>  in_file=$(basename "${input}")
> >> @@ -10,7 +11,7 @@ in_file=$(basename "${input}")
> >>  # generated we first need to move it all into the build dir
> >>  cp "$input" "$out_dir"
> >>
> >> -rst2man "$out_dir/$in_file" "${output%.gz}"
> >> +${rst2man} "$out_dir/$in_file" "${output%.gz}"
> >>
> >>  rm -f "${output}"
> >>  gzip "${output%.gz}"
> >
> > --
> > Jani Nikula, Intel Open Source Graphics Center
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
> 
> 
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3
  2018-09-04 11:56 ` Jani Nikula
  2018-09-04 12:10   ` Daniel Vetter
@ 2018-09-04 15:44   ` Lucas De Marchi
  1 sibling, 0 replies; 15+ messages in thread
From: Lucas De Marchi @ 2018-09-04 15:44 UTC (permalink / raw)
  To: Jani Nikula; +Cc: igt-dev

On Tue, Sep 04, 2018 at 02:56:43PM +0300, Jani Nikula wrote:
> On Fri, 31 Aug 2018, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> > While changing maintainer-tools to allow to use python3 I unsintalled my
> > python2 tools, which broke IGT build for me. Allow to use either
> > rst2man-3 or rst2man.
> >
> > Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> > ---
> >  configure.ac    | 4 ++--
> >  man/Makefile.am | 2 +-
> >  man/meson.build | 4 ++--
> >  man/rst2man.sh  | 7 ++++---
> >  4 files changed, 9 insertions(+), 8 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index c75ef284..bcd24f04 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -52,8 +52,8 @@ enable_gtk_doc=no
> >  ])
> >  
> >  # check for rst2man for generating man pages
> > -AC_CHECK_PROG(RST2MAN, rst2man, yes, no)
> > -AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = xyes])
> > +AC_CHECK_PROGS(RST2MAN, rst2man-3 rst2man, "")
> > +AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = x])
> 
> Is this ugliness what Fedora recommends upstreams all over do to
> workaround their package management decisions? Yuck.

I don't think it's a Fedora thing. Nobody is forcing it upstream neither.
The problem is about having both python2-docutils and python3-docutils
installed at the same time. Because you know, python3 and python2 are
not that compatible so you may need both installed due to other packages
requiring it.

Then it comes the question of "who gets preference into PATH?". For some
packages Fedora uses modules.sh from "alternatives" to export the right dir
to the PATH (this is what happens with sphinx-build, for example... you
may have sphinx-build in your path coming from a python3 installation).
This has its own problem of only being available after loading the profile
so it doesn't play well with CI installing the tool just before building
(see bace7b6cdcd7329545889f1a54fd28977c68c326 in maintainer-tools for
more details).

Arch Linux calls the python2 version rst2man2
(https://www.archlinux.org/packages/community/any/python2-docutils/).
If you decide to install from pypi via pip you will get rst2man.py
for both python2 and python3 and they will simply conflict.
Ubuntu (Debian?) seems to be the sanest, installing everything on
/usr/share/docutils/scripts/python[23]/ (this needs a postinst
rule on the package to update their `alternatives`, so the end result
may differ depending on the order packages were installed, which
for some distros may be unacceptable).

That all said, for me it's just an alternative binary name that we have
support for in the build system and already do that in other cases.

Lucas De Marchi

> 
> BR,
> Jani.
> 
> >  
> >  # Checks for functions, headers, structures, etc.
> >  AC_HEADER_STDC
> > diff --git a/man/Makefile.am b/man/Makefile.am
> > index 777f5d1f..6b357b11 100644
> > --- a/man/Makefile.am
> > +++ b/man/Makefile.am
> > @@ -42,4 +42,4 @@ defs.rst:
> >  	$(AM_V_GEN)echo ".. |MANUAL_GROUP| replace:: General Commands Manual" >> $@
> >  
> >  %.$(APP_MAN_SUFFIX): %.rst defs.rst
> > -	$(AM_V_GEN)rst2man < $< > $@
> > +	$(AM_V_GEN)$(RST2MAN) < $< > $@
> > diff --git a/man/meson.build b/man/meson.build
> > index fa01f9dd..a6b08900 100644
> > --- a/man/meson.build
> > +++ b/man/meson.build
> > @@ -22,14 +22,14 @@ defs_rst = configure_file(input : 'defs.rst.in',
> >  		output : 'defs.rst',
> >  		configuration : config)
> >  
> > -rst2man = find_program('rst2man', required : _man_required)
> > +rst2man = find_program('rst2man-3', 'rst2man', required : _man_required)
> >  rst2man_script = find_program('rst2man.sh')
> >  
> >  if _build_man and rst2man.found()
> >  	foreach manpage : manpages
> >  		custom_target(manpage + '.1',
> >  				build_by_default : true,
> > -				command : [ rst2man_script, '@INPUT@', '@OUTPUT@' ],
> > +				command : [ rst2man_script, rst2man, '@INPUT@', '@OUTPUT@' ],
> >  				depend_files : [ defs_rst ],
> >  				input: manpage + '.rst',
> >  				output : manpage + '.1.gz',
> > diff --git a/man/rst2man.sh b/man/rst2man.sh
> > index 8106ca4b..49a98fc5 100755
> > --- a/man/rst2man.sh
> > +++ b/man/rst2man.sh
> > @@ -1,7 +1,8 @@
> >  #!/bin/bash
> >  
> > -input=$1
> > -output=$2
> > +rst2man=$1
> > +input=$2
> > +output=$3
> >  
> >  out_dir=$(dirname "${output}")
> >  in_file=$(basename "${input}")
> > @@ -10,7 +11,7 @@ in_file=$(basename "${input}")
> >  # generated we first need to move it all into the build dir
> >  cp "$input" "$out_dir"
> >  
> > -rst2man "$out_dir/$in_file" "${output%.gz}"
> > +${rst2man} "$out_dir/$in_file" "${output%.gz}"
> >  
> >  rm -f "${output}"
> >  gzip "${output%.gz}"
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3
  2018-09-04 12:10   ` Daniel Vetter
@ 2018-09-04 12:23     ` Jani Nikula
  2018-09-04 16:00     ` Lucas De Marchi
  1 sibling, 0 replies; 15+ messages in thread
From: Jani Nikula @ 2018-09-04 12:23 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: IGT development, Lucas De Marchi

On Tue, 04 Sep 2018, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> On Tue, Sep 4, 2018 at 1:56 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>> On Fri, 31 Aug 2018, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
>>> While changing maintainer-tools to allow to use python3 I unsintalled my
>>> python2 tools, which broke IGT build for me. Allow to use either
>>> rst2man-3 or rst2man.
>>>
>>> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
>>> ---
>>>  configure.ac    | 4 ++--
>>>  man/Makefile.am | 2 +-
>>>  man/meson.build | 4 ++--
>>>  man/rst2man.sh  | 7 ++++---
>>>  4 files changed, 9 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/configure.ac b/configure.ac
>>> index c75ef284..bcd24f04 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -52,8 +52,8 @@ enable_gtk_doc=no
>>>  ])
>>>
>>>  # check for rst2man for generating man pages
>>> -AC_CHECK_PROG(RST2MAN, rst2man, yes, no)
>>> -AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = xyes])
>>> +AC_CHECK_PROGS(RST2MAN, rst2man-3 rst2man, "")
>>> +AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = x])
>>
>> Is this ugliness what Fedora recommends upstreams all over do to
>> workaround their package management decisions? Yuck.
>
> Use meson (where it's a one-liner). Still meh, but not longer yuck I think :-)

I did refer to rst2man-3 alone, or any-python-tool-3, regardless of how
verbose the workaround has to be. Is this what Fedora as a distro is
intentionally imposing on all upstreams? Or do they have a better idea?

BR,
Jani.

> More seriously, do we really care about fixing these kind of things on
> the old automake build system? I'd say just keep it as-is (and only
> build-test with python2 for automake, and both python2&3 with meson).
> -Daniel
>
>
>>
>> BR,
>> Jani.
>>
>>>
>>>  # Checks for functions, headers, structures, etc.
>>>  AC_HEADER_STDC
>>> diff --git a/man/Makefile.am b/man/Makefile.am
>>> index 777f5d1f..6b357b11 100644
>>> --- a/man/Makefile.am
>>> +++ b/man/Makefile.am
>>> @@ -42,4 +42,4 @@ defs.rst:
>>>       $(AM_V_GEN)echo ".. |MANUAL_GROUP| replace:: General Commands Manual" >> $@
>>>
>>>  %.$(APP_MAN_SUFFIX): %.rst defs.rst
>>> -     $(AM_V_GEN)rst2man < $< > $@
>>> +     $(AM_V_GEN)$(RST2MAN) < $< > $@
>>> diff --git a/man/meson.build b/man/meson.build
>>> index fa01f9dd..a6b08900 100644
>>> --- a/man/meson.build
>>> +++ b/man/meson.build
>>> @@ -22,14 +22,14 @@ defs_rst = configure_file(input : 'defs.rst.in',
>>>               output : 'defs.rst',
>>>               configuration : config)
>>>
>>> -rst2man = find_program('rst2man', required : _man_required)
>>> +rst2man = find_program('rst2man-3', 'rst2man', required : _man_required)
>>>  rst2man_script = find_program('rst2man.sh')
>>>
>>>  if _build_man and rst2man.found()
>>>       foreach manpage : manpages
>>>               custom_target(manpage + '.1',
>>>                               build_by_default : true,
>>> -                             command : [ rst2man_script, '@INPUT@', '@OUTPUT@' ],
>>> +                             command : [ rst2man_script, rst2man, '@INPUT@', '@OUTPUT@' ],
>>>                               depend_files : [ defs_rst ],
>>>                               input: manpage + '.rst',
>>>                               output : manpage + '.1.gz',
>>> diff --git a/man/rst2man.sh b/man/rst2man.sh
>>> index 8106ca4b..49a98fc5 100755
>>> --- a/man/rst2man.sh
>>> +++ b/man/rst2man.sh
>>> @@ -1,7 +1,8 @@
>>>  #!/bin/bash
>>>
>>> -input=$1
>>> -output=$2
>>> +rst2man=$1
>>> +input=$2
>>> +output=$3
>>>
>>>  out_dir=$(dirname "${output}")
>>>  in_file=$(basename "${input}")
>>> @@ -10,7 +11,7 @@ in_file=$(basename "${input}")
>>>  # generated we first need to move it all into the build dir
>>>  cp "$input" "$out_dir"
>>>
>>> -rst2man "$out_dir/$in_file" "${output%.gz}"
>>> +${rst2man} "$out_dir/$in_file" "${output%.gz}"
>>>
>>>  rm -f "${output}"
>>>  gzip "${output%.gz}"
>>
>> --
>> Jani Nikula, Intel Open Source Graphics Center
>> _______________________________________________
>> igt-dev mailing list
>> igt-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3
  2018-09-04 11:56 ` Jani Nikula
@ 2018-09-04 12:10   ` Daniel Vetter
  2018-09-04 12:23     ` Jani Nikula
  2018-09-04 16:00     ` Lucas De Marchi
  2018-09-04 15:44   ` Lucas De Marchi
  1 sibling, 2 replies; 15+ messages in thread
From: Daniel Vetter @ 2018-09-04 12:10 UTC (permalink / raw)
  To: Jani Nikula; +Cc: IGT development, Lucas De Marchi

On Tue, Sep 4, 2018 at 1:56 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Fri, 31 Aug 2018, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
>> While changing maintainer-tools to allow to use python3 I unsintalled my
>> python2 tools, which broke IGT build for me. Allow to use either
>> rst2man-3 or rst2man.
>>
>> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
>> ---
>>  configure.ac    | 4 ++--
>>  man/Makefile.am | 2 +-
>>  man/meson.build | 4 ++--
>>  man/rst2man.sh  | 7 ++++---
>>  4 files changed, 9 insertions(+), 8 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index c75ef284..bcd24f04 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -52,8 +52,8 @@ enable_gtk_doc=no
>>  ])
>>
>>  # check for rst2man for generating man pages
>> -AC_CHECK_PROG(RST2MAN, rst2man, yes, no)
>> -AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = xyes])
>> +AC_CHECK_PROGS(RST2MAN, rst2man-3 rst2man, "")
>> +AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = x])
>
> Is this ugliness what Fedora recommends upstreams all over do to
> workaround their package management decisions? Yuck.

Use meson (where it's a one-liner). Still meh, but not longer yuck I think :-)

More seriously, do we really care about fixing these kind of things on
the old automake build system? I'd say just keep it as-is (and only
build-test with python2 for automake, and both python2&3 with meson).
-Daniel


>
> BR,
> Jani.
>
>>
>>  # Checks for functions, headers, structures, etc.
>>  AC_HEADER_STDC
>> diff --git a/man/Makefile.am b/man/Makefile.am
>> index 777f5d1f..6b357b11 100644
>> --- a/man/Makefile.am
>> +++ b/man/Makefile.am
>> @@ -42,4 +42,4 @@ defs.rst:
>>       $(AM_V_GEN)echo ".. |MANUAL_GROUP| replace:: General Commands Manual" >> $@
>>
>>  %.$(APP_MAN_SUFFIX): %.rst defs.rst
>> -     $(AM_V_GEN)rst2man < $< > $@
>> +     $(AM_V_GEN)$(RST2MAN) < $< > $@
>> diff --git a/man/meson.build b/man/meson.build
>> index fa01f9dd..a6b08900 100644
>> --- a/man/meson.build
>> +++ b/man/meson.build
>> @@ -22,14 +22,14 @@ defs_rst = configure_file(input : 'defs.rst.in',
>>               output : 'defs.rst',
>>               configuration : config)
>>
>> -rst2man = find_program('rst2man', required : _man_required)
>> +rst2man = find_program('rst2man-3', 'rst2man', required : _man_required)
>>  rst2man_script = find_program('rst2man.sh')
>>
>>  if _build_man and rst2man.found()
>>       foreach manpage : manpages
>>               custom_target(manpage + '.1',
>>                               build_by_default : true,
>> -                             command : [ rst2man_script, '@INPUT@', '@OUTPUT@' ],
>> +                             command : [ rst2man_script, rst2man, '@INPUT@', '@OUTPUT@' ],
>>                               depend_files : [ defs_rst ],
>>                               input: manpage + '.rst',
>>                               output : manpage + '.1.gz',
>> diff --git a/man/rst2man.sh b/man/rst2man.sh
>> index 8106ca4b..49a98fc5 100755
>> --- a/man/rst2man.sh
>> +++ b/man/rst2man.sh
>> @@ -1,7 +1,8 @@
>>  #!/bin/bash
>>
>> -input=$1
>> -output=$2
>> +rst2man=$1
>> +input=$2
>> +output=$3
>>
>>  out_dir=$(dirname "${output}")
>>  in_file=$(basename "${input}")
>> @@ -10,7 +11,7 @@ in_file=$(basename "${input}")
>>  # generated we first need to move it all into the build dir
>>  cp "$input" "$out_dir"
>>
>> -rst2man "$out_dir/$in_file" "${output%.gz}"
>> +${rst2man} "$out_dir/$in_file" "${output%.gz}"
>>
>>  rm -f "${output}"
>>  gzip "${output%.gz}"
>
> --
> Jani Nikula, Intel Open Source Graphics Center
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3
  2018-08-31 15:29 Lucas De Marchi
  2018-09-03  9:44 ` Petri Latvala
@ 2018-09-04 11:56 ` Jani Nikula
  2018-09-04 12:10   ` Daniel Vetter
  2018-09-04 15:44   ` Lucas De Marchi
  1 sibling, 2 replies; 15+ messages in thread
From: Jani Nikula @ 2018-09-04 11:56 UTC (permalink / raw)
  To: Lucas De Marchi, igt-dev

On Fri, 31 Aug 2018, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> While changing maintainer-tools to allow to use python3 I unsintalled my
> python2 tools, which broke IGT build for me. Allow to use either
> rst2man-3 or rst2man.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>  configure.ac    | 4 ++--
>  man/Makefile.am | 2 +-
>  man/meson.build | 4 ++--
>  man/rst2man.sh  | 7 ++++---
>  4 files changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index c75ef284..bcd24f04 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -52,8 +52,8 @@ enable_gtk_doc=no
>  ])
>  
>  # check for rst2man for generating man pages
> -AC_CHECK_PROG(RST2MAN, rst2man, yes, no)
> -AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = xyes])
> +AC_CHECK_PROGS(RST2MAN, rst2man-3 rst2man, "")
> +AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = x])

Is this ugliness what Fedora recommends upstreams all over do to
workaround their package management decisions? Yuck.

BR,
Jani.

>  
>  # Checks for functions, headers, structures, etc.
>  AC_HEADER_STDC
> diff --git a/man/Makefile.am b/man/Makefile.am
> index 777f5d1f..6b357b11 100644
> --- a/man/Makefile.am
> +++ b/man/Makefile.am
> @@ -42,4 +42,4 @@ defs.rst:
>  	$(AM_V_GEN)echo ".. |MANUAL_GROUP| replace:: General Commands Manual" >> $@
>  
>  %.$(APP_MAN_SUFFIX): %.rst defs.rst
> -	$(AM_V_GEN)rst2man < $< > $@
> +	$(AM_V_GEN)$(RST2MAN) < $< > $@
> diff --git a/man/meson.build b/man/meson.build
> index fa01f9dd..a6b08900 100644
> --- a/man/meson.build
> +++ b/man/meson.build
> @@ -22,14 +22,14 @@ defs_rst = configure_file(input : 'defs.rst.in',
>  		output : 'defs.rst',
>  		configuration : config)
>  
> -rst2man = find_program('rst2man', required : _man_required)
> +rst2man = find_program('rst2man-3', 'rst2man', required : _man_required)
>  rst2man_script = find_program('rst2man.sh')
>  
>  if _build_man and rst2man.found()
>  	foreach manpage : manpages
>  		custom_target(manpage + '.1',
>  				build_by_default : true,
> -				command : [ rst2man_script, '@INPUT@', '@OUTPUT@' ],
> +				command : [ rst2man_script, rst2man, '@INPUT@', '@OUTPUT@' ],
>  				depend_files : [ defs_rst ],
>  				input: manpage + '.rst',
>  				output : manpage + '.1.gz',
> diff --git a/man/rst2man.sh b/man/rst2man.sh
> index 8106ca4b..49a98fc5 100755
> --- a/man/rst2man.sh
> +++ b/man/rst2man.sh
> @@ -1,7 +1,8 @@
>  #!/bin/bash
>  
> -input=$1
> -output=$2
> +rst2man=$1
> +input=$2
> +output=$3
>  
>  out_dir=$(dirname "${output}")
>  in_file=$(basename "${input}")
> @@ -10,7 +11,7 @@ in_file=$(basename "${input}")
>  # generated we first need to move it all into the build dir
>  cp "$input" "$out_dir"
>  
> -rst2man "$out_dir/$in_file" "${output%.gz}"
> +${rst2man} "$out_dir/$in_file" "${output%.gz}"
>  
>  rm -f "${output}"
>  gzip "${output%.gz}"

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3
  2018-08-31 15:29 Lucas De Marchi
@ 2018-09-03  9:44 ` Petri Latvala
  2018-09-04 11:56 ` Jani Nikula
  1 sibling, 0 replies; 15+ messages in thread
From: Petri Latvala @ 2018-09-03  9:44 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: igt-dev

On Fri, Aug 31, 2018 at 08:29:47AM -0700, Lucas De Marchi wrote:
> While changing maintainer-tools to allow to use python3 I unsintalled my
> python2 tools, which broke IGT build for me. Allow to use either
> rst2man-3 or rst2man.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>  configure.ac    | 4 ++--
>  man/Makefile.am | 2 +-
>  man/meson.build | 4 ++--
>  man/rst2man.sh  | 7 ++++---
>  4 files changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index c75ef284..bcd24f04 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -52,8 +52,8 @@ enable_gtk_doc=no
>  ])
>  
>  # check for rst2man for generating man pages
> -AC_CHECK_PROG(RST2MAN, rst2man, yes, no)
> -AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = xyes])
> +AC_CHECK_PROGS(RST2MAN, rst2man-3 rst2man, "")
> +AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = x])
                                                  ^^^^  ?


-- 
Petri Latvala



>  
>  # Checks for functions, headers, structures, etc.
>  AC_HEADER_STDC
> diff --git a/man/Makefile.am b/man/Makefile.am
> index 777f5d1f..6b357b11 100644
> --- a/man/Makefile.am
> +++ b/man/Makefile.am
> @@ -42,4 +42,4 @@ defs.rst:
>  	$(AM_V_GEN)echo ".. |MANUAL_GROUP| replace:: General Commands Manual" >> $@
>  
>  %.$(APP_MAN_SUFFIX): %.rst defs.rst
> -	$(AM_V_GEN)rst2man < $< > $@
> +	$(AM_V_GEN)$(RST2MAN) < $< > $@
> diff --git a/man/meson.build b/man/meson.build
> index fa01f9dd..a6b08900 100644
> --- a/man/meson.build
> +++ b/man/meson.build
> @@ -22,14 +22,14 @@ defs_rst = configure_file(input : 'defs.rst.in',
>  		output : 'defs.rst',
>  		configuration : config)
>  
> -rst2man = find_program('rst2man', required : _man_required)
> +rst2man = find_program('rst2man-3', 'rst2man', required : _man_required)
>  rst2man_script = find_program('rst2man.sh')
>  
>  if _build_man and rst2man.found()
>  	foreach manpage : manpages
>  		custom_target(manpage + '.1',
>  				build_by_default : true,
> -				command : [ rst2man_script, '@INPUT@', '@OUTPUT@' ],
> +				command : [ rst2man_script, rst2man, '@INPUT@', '@OUTPUT@' ],
>  				depend_files : [ defs_rst ],
>  				input: manpage + '.rst',
>  				output : manpage + '.1.gz',
> diff --git a/man/rst2man.sh b/man/rst2man.sh
> index 8106ca4b..49a98fc5 100755
> --- a/man/rst2man.sh
> +++ b/man/rst2man.sh
> @@ -1,7 +1,8 @@
>  #!/bin/bash
>  
> -input=$1
> -output=$2
> +rst2man=$1
> +input=$2
> +output=$3
>  
>  out_dir=$(dirname "${output}")
>  in_file=$(basename "${input}")
> @@ -10,7 +11,7 @@ in_file=$(basename "${input}")
>  # generated we first need to move it all into the build dir
>  cp "$input" "$out_dir"
>  
> -rst2man "$out_dir/$in_file" "${output%.gz}"
> +${rst2man} "$out_dir/$in_file" "${output%.gz}"
>  
>  rm -f "${output}"
>  gzip "${output%.gz}"
> -- 
> 2.17.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3
@ 2018-08-31 15:29 Lucas De Marchi
  2018-09-03  9:44 ` Petri Latvala
  2018-09-04 11:56 ` Jani Nikula
  0 siblings, 2 replies; 15+ messages in thread
From: Lucas De Marchi @ 2018-08-31 15:29 UTC (permalink / raw)
  To: igt-dev

While changing maintainer-tools to allow to use python3 I unsintalled my
python2 tools, which broke IGT build for me. Allow to use either
rst2man-3 or rst2man.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 configure.ac    | 4 ++--
 man/Makefile.am | 2 +-
 man/meson.build | 4 ++--
 man/rst2man.sh  | 7 ++++---
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index c75ef284..bcd24f04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,8 +52,8 @@ enable_gtk_doc=no
 ])
 
 # check for rst2man for generating man pages
-AC_CHECK_PROG(RST2MAN, rst2man, yes, no)
-AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = xyes])
+AC_CHECK_PROGS(RST2MAN, rst2man-3 rst2man, "")
+AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = x])
 
 # Checks for functions, headers, structures, etc.
 AC_HEADER_STDC
diff --git a/man/Makefile.am b/man/Makefile.am
index 777f5d1f..6b357b11 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -42,4 +42,4 @@ defs.rst:
 	$(AM_V_GEN)echo ".. |MANUAL_GROUP| replace:: General Commands Manual" >> $@
 
 %.$(APP_MAN_SUFFIX): %.rst defs.rst
-	$(AM_V_GEN)rst2man < $< > $@
+	$(AM_V_GEN)$(RST2MAN) < $< > $@
diff --git a/man/meson.build b/man/meson.build
index fa01f9dd..a6b08900 100644
--- a/man/meson.build
+++ b/man/meson.build
@@ -22,14 +22,14 @@ defs_rst = configure_file(input : 'defs.rst.in',
 		output : 'defs.rst',
 		configuration : config)
 
-rst2man = find_program('rst2man', required : _man_required)
+rst2man = find_program('rst2man-3', 'rst2man', required : _man_required)
 rst2man_script = find_program('rst2man.sh')
 
 if _build_man and rst2man.found()
 	foreach manpage : manpages
 		custom_target(manpage + '.1',
 				build_by_default : true,
-				command : [ rst2man_script, '@INPUT@', '@OUTPUT@' ],
+				command : [ rst2man_script, rst2man, '@INPUT@', '@OUTPUT@' ],
 				depend_files : [ defs_rst ],
 				input: manpage + '.rst',
 				output : manpage + '.1.gz',
diff --git a/man/rst2man.sh b/man/rst2man.sh
index 8106ca4b..49a98fc5 100755
--- a/man/rst2man.sh
+++ b/man/rst2man.sh
@@ -1,7 +1,8 @@
 #!/bin/bash
 
-input=$1
-output=$2
+rst2man=$1
+input=$2
+output=$3
 
 out_dir=$(dirname "${output}")
 in_file=$(basename "${input}")
@@ -10,7 +11,7 @@ in_file=$(basename "${input}")
 # generated we first need to move it all into the build dir
 cp "$input" "$out_dir"
 
-rst2man "$out_dir/$in_file" "${output%.gz}"
+${rst2man} "$out_dir/$in_file" "${output%.gz}"
 
 rm -f "${output}"
 gzip "${output%.gz}"
-- 
2.17.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-09-06  7:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 18:43 [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3 Lucas De Marchi
2018-09-05 19:36 ` [igt-dev] ✓ Fi.CI.BAT: success for build: allow to use rst2man from python3 (rev2) Patchwork
2018-09-06  2:24 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-09-06  6:06 ` [igt-dev] [PATCH i-g-t] build: allow to use rst2man from python3 Jani Nikula
2018-09-06  7:20   ` Lucas De Marchi
  -- strict thread matches above, loose matches on Subject: below --
2018-08-31 15:29 Lucas De Marchi
2018-09-03  9:44 ` Petri Latvala
2018-09-04 11:56 ` Jani Nikula
2018-09-04 12:10   ` Daniel Vetter
2018-09-04 12:23     ` Jani Nikula
2018-09-04 16:00     ` Lucas De Marchi
2018-09-04 16:05       ` Lucas De Marchi
2018-09-04 18:35         ` Daniel Vetter
2018-09-05  9:06           ` Petri Latvala
2018-09-04 15:44   ` Lucas De Marchi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.