Source: python-miio Version: 0.5.0.1-2 Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: buildpath X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0] we noticed that python-miio could not be built reproducibly. This because the generation of the manual pages via help2man was resulting in an error and thus the inclusion of a Python traceback within those manpages. This traceback specified the absolute build path which made the build unreproducible. (As it happens, I believe there is a Lintian check for manpages that include Python tracebacks.) However, I believe the issue is deeper than just a reproducibility issue, in that miio is not actually compatible with python3-click versions greater than 8.0, as that is the version that Click renamed the "resultcallback" method to "result_callback": https://click.palletsprojects.com/en/8.1.x/api/#click.MultiCommand.result_callback Patch attached that simply renames these methods. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/result_callback.patch 1969-12-31 16:00:00.000000000 -0800 --- b/debian/patches/result_callback.patch 2023-01-20 11:05:18.752043147 -0800 @@ -0,0 +1,26 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2023-01-20 + +--- python-miio-0.5.0.1.orig/miio/vacuum.py ++++ python-miio-0.5.0.1/miio/vacuum.py +@@ -670,7 +670,7 @@ class Vacuum(Device): + callback=callback, + ) + +- @dg.resultcallback() ++ @dg.result_callback() + @dg.device_pass + def cleanup(vac: Vacuum, *args, **kwargs): + if vac.ip is None: # dummy Device for discovery, skip teardown +--- python-miio-0.5.0.1.orig/miio/vacuum_cli.py ++++ python-miio-0.5.0.1/miio/vacuum_cli.py +@@ -77,7 +77,7 @@ def cli(ctx, ip: str, token: str, debug: + cleanup(vac, id_file=id_file) + + +-@cli.resultcallback() ++@cli.result_callback() + @pass_dev + def cleanup(vac: miio.Vacuum, *args, **kwargs): + if vac.ip is None: # dummy Device for discovery, skip teardown --- a/debian/patches/series 1969-12-31 16:00:00.000000000 -0800 --- b/debian/patches/series 2023-01-20 11:05:15.760517986 -0800 @@ -0,0 +1 @@ +result_callback.patch