Bug#936399: diodon: Python2 removal in sid/bullseye
Just an update on the current progress of this issue. Updating of waf seems to be more complicated and breaks the current build. Instead of trying to fix those errors an upstream PR is work in progress to move to meson build system as many GNOME projects do as well. See https://github.com/diodon-dev/diodon/pull/12 It is not quite finished yet and any help would be appreciated especially on changing the debian files to use meson instead of waf. Oliver
Bug#936399: diodon: Python2 removal in sid/bullseye
Thanks for trying. Currently an outdated version of waf is used maybe that explains why it doesn't run with python3. I will see when I get around to update waf upstream and repackage a new Diodon version. Oliver On 18.09.19 06:21, Scott Kitterman wrote: This turns out to be more complicated than I had expected. Internally waf uses /usr/bin/env python (which still, of course, is /usr/bin/python vice python3), so it fails with python3 even though the upstream code appears to at least in part consider python3. This I could fix with sed, something like: find -name "*.py" | xargs sed -i "s:\/usr\/bin\/env\ python:\/usr/bin\/ python3:g" sed -i "s:\/usr\/bin\/env\ python:\/usr/bin\/python3:g" waf sed -i "s:\/usr\/bin\/env\ python:\/usr/bin\/python3:g" wscript Not pretty, but works. But then waf exploads on me: ./waf distclean --nocache --prefix=/usr Traceback (most recent call last): File "./diodon-1.8.0/waflib/Node.py", line 491, in ant_iter raise StopIteration StopIteration The above exception was the direct cause of the following exception: Traceback (./diodon-1.8.0/waflib/Scripting.py", line 138, in waf_entry_point run_commands() File "./diodon-1.8.0/waflib/Scripting.py", line 225, in run_commands parse_options() File "./diodon-1.8.0/waflib/Scripting.py", line 186, in parse_options Context.create_context('options').execute() File "./diodon-1.8.0/waflib/Options.py", line 250, in execute super(OptionsContext, self).execute() File "./diodon-1.8.0/waflib/Context.py", line 216, in execute self.recurse([os.path.dirname(g_module.root_path)]) File "./diodon-1.8.0/waflib/Context.py", line 294, in recurse user_function(self) File "./diodon-1.8.0/wscript", line 39, in options opt.tool_options('compiler_c') File "./diodon-1.8.0/waflib/Context.py", line 209, in load fun(self) File "./diodon-1.8.0/waflib/Tools/compiler_c.py", line 87, in options opt.load_special_tools('c_*.py', ban=['c_dumbpreproc.py']) File "./diodon-1.8.0/waflib/Context.py", line 515, in load_special_tools lst = self.root.find_node(waf_dir).find_node('waflib/extras').ant_glob(var) File "./diodon-1.8.0/waflib/Node.py", line 579, in ant_glob ret = [x for x in self.ant_iter(accept=accept, pats=[to_pat(incl), to_pat(excl)], maxdepth=25, dir=dir, src=src, remove=kw.get('remove', True))] File "./diodon-1.8.0/waflib/Node.py", line 579, in ret = [x for x in self.ant_iter(accept=accept, pats=[to_pat(incl), to_pat(excl)], maxdepth=25, dir=dir, src=src, remove=kw.get('remove', True))] RuntimeError: generator raised StopIteration make[1]: *** [debian/rules:18: override_dh_auto_clean] Error 2 make[1]: Leaving directory './diodon-1.8.0' make: *** [debian/rules:10: clean] Error 2 dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2 I don't know anything about waf, so that's not something I can troubleshoot. Not going to NMU. Scott K On Tuesday, September 17, 2019 1:46:07 PM EDT Oliver Sauder wrote: I currently do not have a lot of time at hand. So if you could follow up releasing your NMU debdiff that would be great (diff looks good to me). Oliver On 01.09.19 09:18, Scott Kitterman wrote: On Fri, 30 Aug 2019 07:15:05 + Matthias Klose wrote: Package: src:diodon Version: 1.8.0-1 Severity: normal Tags: sid bullseye User: debian-pyt...@lists.debian.org Usertags: py2removal Python2 becomes end-of-live upstream, and Debian aims to remove Python2 from the distribution, as discussed in https://lists.debian.org/debian-python/2019/07/msg00080.html Your package either build-depends, depends on Python2, or uses Python2 in the autopkg tests. Please stop using Python2, and fix this issue by one of the following actions. I've attached a fix in the form of an NMU debdiff. I don't currently plan to NMU, but may later if this remains open. Please fix. Scott K
Bug#936399: diodon: Python2 removal in sid/bullseye
This turns out to be more complicated than I had expected. Internally waf uses /usr/bin/env python (which still, of course, is /usr/bin/python vice python3), so it fails with python3 even though the upstream code appears to at least in part consider python3. This I could fix with sed, something like: find -name "*.py" | xargs sed -i "s:\/usr\/bin\/env\ python:\/usr/bin\/ python3:g" sed -i "s:\/usr\/bin\/env\ python:\/usr/bin\/python3:g" waf sed -i "s:\/usr\/bin\/env\ python:\/usr/bin\/python3:g" wscript Not pretty, but works. But then waf exploads on me: ./waf distclean --nocache --prefix=/usr Traceback (most recent call last): File "./diodon-1.8.0/waflib/Node.py", line 491, in ant_iter raise StopIteration StopIteration The above exception was the direct cause of the following exception: Traceback (./diodon-1.8.0/waflib/Scripting.py", line 138, in waf_entry_point run_commands() File "./diodon-1.8.0/waflib/Scripting.py", line 225, in run_commands parse_options() File "./diodon-1.8.0/waflib/Scripting.py", line 186, in parse_options Context.create_context('options').execute() File "./diodon-1.8.0/waflib/Options.py", line 250, in execute super(OptionsContext, self).execute() File "./diodon-1.8.0/waflib/Context.py", line 216, in execute self.recurse([os.path.dirname(g_module.root_path)]) File "./diodon-1.8.0/waflib/Context.py", line 294, in recurse user_function(self) File "./diodon-1.8.0/wscript", line 39, in options opt.tool_options('compiler_c') File "./diodon-1.8.0/waflib/Context.py", line 209, in load fun(self) File "./diodon-1.8.0/waflib/Tools/compiler_c.py", line 87, in options opt.load_special_tools('c_*.py', ban=['c_dumbpreproc.py']) File "./diodon-1.8.0/waflib/Context.py", line 515, in load_special_tools lst = self.root.find_node(waf_dir).find_node('waflib/extras').ant_glob(var) File "./diodon-1.8.0/waflib/Node.py", line 579, in ant_glob ret = [x for x in self.ant_iter(accept=accept, pats=[to_pat(incl), to_pat(excl)], maxdepth=25, dir=dir, src=src, remove=kw.get('remove', True))] File "./diodon-1.8.0/waflib/Node.py", line 579, in ret = [x for x in self.ant_iter(accept=accept, pats=[to_pat(incl), to_pat(excl)], maxdepth=25, dir=dir, src=src, remove=kw.get('remove', True))] RuntimeError: generator raised StopIteration make[1]: *** [debian/rules:18: override_dh_auto_clean] Error 2 make[1]: Leaving directory './diodon-1.8.0' make: *** [debian/rules:10: clean] Error 2 dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2 I don't know anything about waf, so that's not something I can troubleshoot. Not going to NMU. Scott K On Tuesday, September 17, 2019 1:46:07 PM EDT Oliver Sauder wrote: > I currently do not have a lot of time at hand. So if you could follow up > releasing your NMU debdiff that would be great (diff looks good to me). > > Oliver > > On 01.09.19 09:18, Scott Kitterman wrote: > > On Fri, 30 Aug 2019 07:15:05 + Matthias Klose wrote: > >> Package: src:diodon > >> Version: 1.8.0-1 > >> Severity: normal > >> Tags: sid bullseye > >> User: debian-pyt...@lists.debian.org > >> Usertags: py2removal > >> > >> Python2 becomes end-of-live upstream, and Debian aims to remove > >> Python2 from the distribution, as discussed in > >> https://lists.debian.org/debian-python/2019/07/msg00080.html > >> > >> Your package either build-depends, depends on Python2, or uses Python2 > >> in the autopkg tests. Please stop using Python2, and fix this issue > >> by one of the following actions. > > > > I've attached a fix in the form of an NMU debdiff. I don't currently plan > > to NMU, but may later if this remains open. Please fix. > > > > Scott K signature.asc Description: This is a digitally signed message part.
Bug#936399: diodon: Python2 removal in sid/bullseye
I currently do not have a lot of time at hand. So if you could follow up releasing your NMU debdiff that would be great (diff looks good to me). Oliver On 01.09.19 09:18, Scott Kitterman wrote: On Fri, 30 Aug 2019 07:15:05 + Matthias Klose wrote: Package: src:diodon Version: 1.8.0-1 Severity: normal Tags: sid bullseye User: debian-pyt...@lists.debian.org Usertags: py2removal Python2 becomes end-of-live upstream, and Debian aims to remove Python2 from the distribution, as discussed in https://lists.debian.org/debian-python/2019/07/msg00080.html Your package either build-depends, depends on Python2, or uses Python2 in the autopkg tests. Please stop using Python2, and fix this issue by one of the following actions. I've attached a fix in the form of an NMU debdiff. I don't currently plan to NMU, but may later if this remains open. Please fix. Scott K
Bug#936399: diodon: Python2 removal in sid/bullseye
On Fri, 30 Aug 2019 07:15:05 + Matthias Klose wrote: > Package: src:diodon > Version: 1.8.0-1 > Severity: normal > Tags: sid bullseye > User: debian-pyt...@lists.debian.org > Usertags: py2removal > > Python2 becomes end-of-live upstream, and Debian aims to remove > Python2 from the distribution, as discussed in > https://lists.debian.org/debian-python/2019/07/msg00080.html > > Your package either build-depends, depends on Python2, or uses Python2 > in the autopkg tests. Please stop using Python2, and fix this issue > by one of the following actions. I've attached a fix in the form of an NMU debdiff. I don't currently plan to NMU, but may later if this remains open. Please fix. Scott Kdiff -Nru diodon-1.8.0/debian/changelog diodon-1.8.0/debian/changelog --- diodon-1.8.0/debian/changelog 2018-03-11 15:37:08.0 -0400 +++ diodon-1.8.0/debian/changelog 2019-09-01 00:55:31.0 -0400 @@ -1,3 +1,13 @@ +diodon (1.8.0-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Switch build system to python3 (Closes: #936399) + * Drop use of dh_python2 in debian/rules, uneeded since python is only used +during the build + * Fix clean rule to also remove po cache so package builds twice in a row + + -- Scott Kitterman Sun, 01 Sep 2019 04:55:31 + + diodon (1.8.0-1) unstable; urgency=medium * New upstream release. diff -Nru diodon-1.8.0/debian/control diodon-1.8.0/debian/control --- diodon-1.8.0/debian/control 2018-03-11 15:37:08.0 -0400 +++ diodon-1.8.0/debian/control 2019-09-01 00:55:31.0 -0400 @@ -11,7 +11,7 @@ libpeas-dev (>=1.1.1), libxtst-dev (>= 1.2.0), libzeitgeist-2.0-dev (>= 0.9.14), - python, + python3, valac (>=0.26.0), xvfb Standards-Version: 4.1.3 diff -Nru diodon-1.8.0/debian/rules diodon-1.8.0/debian/rules --- diodon-1.8.0/debian/rules 2017-12-16 13:46:18.0 -0500 +++ diodon-1.8.0/debian/rules 2019-09-01 00:55:31.0 -0400 @@ -7,7 +7,7 @@ endif %: - dh $@ --with python2 + dh $@ WAF=./waf @@ -15,6 +15,7 @@ $(WAF) distclean $(WAFFLAGS) rm -rf _build_ find -name '*.pyc' -delete + rm -rf po/.intlcache override_dh_auto_configure: $(WAF) configure $(WAFFLAGS) --sysconfdir /etc --libdir /usr/lib/$(DEB_HOST_MULTIARCH)