Drew,

FYI dh-python=4.20201102+nmu1 can do this (pyproject.toml without setup.py), but
you must opt-in to "flit" specifically.

Documentation is here:

    https://manpages.debian.org/unstable/dh-python/pybuild.1.en.html#flit_plugin

A minimal complete example is on #987296:

    
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=2;bug=987296;filename=xx_0~1.tar.xz;msg=5

A real-world package in Debian is jeepney=0.6.0-1.
It has a ./setup.py, but if you rm it, the package still builds OK.

    https://salsa.debian.org/python-team/packages/jeepney.git

NOTE: (I think) this only works if upstream picked flit, i.e.
      pyproject.toml has [tool.flit.metadata].

      Some random examples NOT using flit:
      https://github.com/python/mypy/blob/master/pyproject.toml
      https://github.com/numpy/numpy/blob/main/pyproject.toml
      https://github.com/pandas-dev/pandas/blob/master/pyproject.toml

In your case, https://github.com/jdber1/opendrop/blob/master/pyproject.toml
I guess pybuild needs a plugin 
/usr/share/dh-python/dhpython/build/plugin_scons.py
similar to the existing plugin_flit.py.

It looks like "./pyproject.toml exists" is far from sufficient to know
how to actually build something :-(


Drew Parsons wrote:
> Package: dh-python
> Version: 4.20201102+nmu1
> Severity: important
>
> Increasingly upstream packages have been moving to the PEP518 build
> format, for which a pyproject.toml file is provided, and no setup.py
>
> pybuild fails to handle such packages. In some cases a trivial
> setup.py can be patched in, or an old one from before upstream updated
> to PEP518.  But this does not work for all packages (fails badly with
> opendrop, for instance, where scons is invoked).
>
> pybuild needs to start supporting the PEP518 build method.
>
> Too late for bullseye, but I'd like to consider this a serious (FTBFS)
> bug post-bullseye.

Reply via email to