Bug#984767: dh-virtualenv: Can't build packages with compat >= 12 as --buildsystem doesn't work

2021-04-26 Thread Vincent Bernat
severity 984767 normal
tag 984767 + moreinfo
thanks

 ❦  8 mars 2021 08:55 +01, Johann Queuniet:

> I have issues with building packages with dh-virtualenv using a compat
> of 12 or higher, ending up with the following error:
>
> ```
>  debian/rules binary
> dh binary --with python-virtualenv --python /usr/bin/python3
>dh_update_autotools_config -O--python=/usr/bin/python3
>dh_autoreconf -O--python=/usr/bin/python3
>dh_auto_configure -O--python=/usr/bin/python3
> dh_auto_configure: warning: Please use the third-party "pybuild" build system 
> instead of python-distutils
> dh_auto_configure: error: This feature was removed in compat 12.
> make: *** [debian/rules:4: binary] Error 255
> dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 
> 2
> ```
>
> If I try to ask for pybuild with --buildsystem, the build goes a bit
> further, but still fails:
>
> ```
>  debian/rules binary
> dh binary --with python-virtualenv --builtin-venv --python /usr/bin/python3 
> --buildsystem=pybuild
>dh_update_autotools_config -O--builtin-venv -O--python=/usr/bin/python3 
> -O--buildsystem=pybuild
>dh_autoreconf -O--builtin-venv -O--python=/usr/bin/python3 
> -O--buildsystem=pybuild
>dh_auto_configure -O--builtin-venv -O--python=/usr/bin/python3 
> -O--buildsystem=pybuild
> I: pybuild base:232: python3.9 setup.py config
> running config
>create-stamp debian/debhelper-build-stamp
>dh_testroot -O--builtin-venv -O--python=/usr/bin/python3 
> -O--buildsystem=pybuild
>dh_prep -O--builtin-venv -O--python=/usr/bin/python3 
> -O--buildsystem=pybuild
>dh_installdocs -O--builtin-venv -O--python=/usr/bin/python3 
> -O--buildsystem=pybuild
>dh_installchangelogs -O--builtin-venv -O--python=/usr/bin/python3 
> -O--buildsystem=pybuild
>dh_virtualenv -O--builtin-venv -O--python=/usr/bin/python3 
> -O--buildsystem=pybuild
> Usage: dh_virtualenv [options]
>
> dh_virtualenv: error: no such option: --buildsystem
> make: *** [debian/rules:4: binary] Error 2
> dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 
> 2
> ```

I am able to build with compatibility 12:

%:
dh $@ --buildsystem=pybuild --with python-virtualenv
override_dh_virtualenv:
dh_virtualenv --python python3

I don't remember if you tried that. So, while it could work out of the
box without overriding dh_virtualenv, it works good enough to be in a
release, with two solutions:

 - use compatibility 11
 - override dh_virtualenv invocation to not chocke on
   --buildsystem=pybuild

Also, it seems you pass --builtin-venv to dh, you only need to pass it
to dh_virtualenv.
-- 
10.0 times 0.1 is hardly ever 1.0.
- The Elements of Programming Style (Kernighan & Plauger)



Processed: Re: Bug#984767: dh-virtualenv: Can't build packages with compat >= 12 as --buildsystem doesn't work

2021-04-26 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> severity 984767 normal
Bug #984767 [dh-virtualenv] dh-virtualenv: Can't build packages with compat >= 
12 as --buildsystem doesn't work
Severity set to 'normal' from 'serious'
> tag 984767 + moreinfo
Bug #984767 [dh-virtualenv] dh-virtualenv: Can't build packages with compat >= 
12 as --buildsystem doesn't work
Added tag(s) moreinfo.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
984767: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984767
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems