Control: retitle -1 dh-python: pybuild runs `python3.x setup.py test` which no 
longer works in unstable
Control: severity -1 important

On Mon, 08 Feb 2021 at 13:22:14 +0000, Julian Gilbey wrote:
> I'm just building a Python module package, and I get the following
> warning message:
> 
> I: pybuild base:232: python3.9 setup.py test 
> running test
> WARNING: Testing via this command is deprecated and will be removed in a 
> future version. Users looking for a generic test entry point independent of 
> test runner are encouraged to use tox.
> 
> Since it is dh-python that runs this command, presumably it is
> dh-python that should change it, or maybe I'm wrong?

With the upload of setuptools 73 to unstable, it seems the effect of running
`python3.x setup.py test` has changed to be a FTFBS. For example, in
src:software-properties which I was looking at for unrelated reasons
(I've reported a FTBFS bug but I don't have a bug number for it yet):

> dbus-run-session -- dh_auto_test
> I: pybuild base:311: python3.12 setup.py test
> ERROR: Python module Queue not found
> ERROR: Python module urllib2 not found
...
> ERROR: Python module Queue not found
> ERROR: Python module ConfigParser not found
> /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:268: 
> UserWarning: Unknown distribution option: 'test_suite'
>   warnings.warn(msg)
> usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
>    or: setup.py --help [cmd1 cmd2 ...]
>    or: setup.py --help-commands
>    or: setup.py cmd --help
> 
> error: invalid command 'test'
> E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: 
> python3.12 setup.py test

So probably making pybuild run `python3.x -m unittest discover ...` is now
better than `python3.x setup.py test`, even if it makes some packages FTBFS,
because the alternative is that *all* affected packages FTBFS?

    smcv

Reply via email to