[Python-modules-team] Bug#955414: python3-pip: pip fails to install packages with pyproject.toml

reiter.christoph at gmail.com reiter.christoph at gmail.com
Tue Mar 31 19:12:34 BST 2020


On Tue, 31 Mar 2020 09:58:21 -0400 Scott Kitterman <debian at kitterman.com> wrote:
> On Tue, 31 Mar 2020 14:31:40 +0200 Christoph Reiter 
> <reiter.christoph at gmail.com> wrote:
> > Package: python3-pip
> > Version: 20.0.2-2
> > Severity: important
> > 
> > Dear Maintainer,
> > 
> > (Note: This doesn't affect upstream pip, only the Debian/Ubuntu version)
> > 
> > pip in Debian (and Ubuntu focal) fails to install Python packages which 
> contain
> > a pyproject.toml
> > file. I've initially reported this upstream, but it turns out this is only
> > broken in the Debian version of pip.
> > 
> > Related upstream issues:
> > 
> > * https://github.com/pypa/pip/issues/7946
> > * https://github.com/pypa/pip/issues/7874
> > 
> > I've created a minimal reproducer:
> > 
> > https://github.com/lazka/pip-pyproject-bug
> 
> This looks like another instance of #954256 [1].  It looks like it is related 
> to unvendoring pep517, but I don't have it entirely figured out yet.

Thanks, yes that look related.

So looking a bit into it (likely things you already know) this is because Debian
installs wheels of the vendored deps into the venv and pep517 0.7 doesn't
support its scripts being run from there. A newer pep517 got support for
running things from the wheel (https://github.com/pypa/pep517/pull/55),
but the wheel shipped by Debian still is at 0.7.

Replacing the wheel with a newer one leads to

  Traceback (most recent call last):
    File "/tmp/tmp8w05syzc", line 26, in <module>
      import compat
  ModuleNotFoundError: No module named 'compat'

which is kinda expected as imports from the same package don't work in this
context.

On solution would be to inline the "compat.py" module into the "_in_process.py"
script.



More information about the Python-modules-team mailing list