Skip to contentSkip to conversation

build: allow to use rst2man from python3

PATCH In review Lucas De Marchi 3 participants 5 messages Sep 5, 2018 – Sep 6, 2018 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: allow to use rst2man from python3

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

---
 man/meson.build | 4 ++--
 man/rst2man.sh  | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)
man/meson.build +2 -2
index fa01f9dd..a6b08900 100644
@@ -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',
man/rst2man.sh +4 -3
index 8106ca4b..49a98fc5 100755
@@ -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}"
Signature · 6 lines
2.17.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for build: allow to use rst2man from python3 (rev2)

== Series Details ==

== 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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for build: allow to use rst2man from python3 (rev2)

In reply to Lucas De Marchi
== Series Details ==

== 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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Acked-by on v1 1/1
#3 lore raw
In reply to Lucas De Marchi
Quoted 7 lines · Lucas De Marchi

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

I guess after all my nitpicking, an

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.

Quoted 50 lines
---
 man/meson.build | 4 ++--
 man/rst2man.sh  | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)
man/meson.build +2 -2
index fa01f9dd..a6b08900 100644
@@ -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',
man/rst2man.sh +4 -3
index 8106ca4b..49a98fc5 100755
@@ -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}"
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#4 lore raw
Quoted 7 lines · Jani Nikula
Quoted 6 lines · Lucas De Marchi

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

Quoted 7 lines
Quoted 1 line

I guess after all my nitpicking, an

is in order.

thanks

Quoted 3 lines

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

Quoted 50 lines

BR,
Jani.

Quoted 45 lines
---
 man/meson.build | 4 ++--
 man/rst2man.sh  | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)
man/meson.build +2 -2
index fa01f9dd..a6b08900 100644
@@ -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',
man/rst2man.sh +3 -2
index 8106ca4b..49a98fc5 100755
@@ -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"
 
Quoted 8 lines
Quoted 5 lines
man/rst2man.sh +1 -1
-rst2man "$out_dir/$in_file" "${output%.gz}"
+${rst2man} "$out_dir/$in_file" "${output%.gz}"
 
 rm -f "${output}"
 gzip "${output%.gz}"
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev