[Python-modules-team] Bug#954256: python-pip-whl: Editable installs broken: can't find __main__ module

Alexander Clausen alex at gc-web.de
Thu Mar 19 11:58:48 GMT 2020


Package: python-pip-whl
Version: 20.0.2-2
Severity: normal

Dear pip Maintainers,

trying to install a package in a virtualenv with the -e switch fails with the following
error:

=================
$ pip install -e . --isolated
Obtaining file:///tmp/pypa2
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /tmp/venv/bin/python3.8 /tmp/venv/share/python-wheels/pep517-0.7.0-py2.py3-none-any.whl/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp0hod1rxb
       cwd: /tmp/pypa2
  Complete output (1 lines):
  /tmp/venv/bin/python3.8: can't find '__main__' module in '/tmp/venv/share/python-wheels/pep517-0.7.0-py2.py3-none-any.whl/pep517/_in_process.py'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /tmp/venv/bin/python3.8 /tmp/venv/share/python-wheels/pep517-0.7.0-py2.py3-none-any.whl/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp0hod1rxb Check the logs for full command output.
=================

Steps to reproduce:

1) Create virtualenv:

$ python3 -m venv /tmp/venv/
$ source /tmp/venv/bin/activate

2) Create a minimal Python package:

$ mkdir pypa && cd pypa
$ echo "from setuptools import setup; setup()" > setup.py
$ touch pyproject.toml

3) Try to install it:

$ pip install --isolated -e .

(the isolated is needed for me as I have additional indexes in my config)

This fails with the error pasted above. Replacing pip with the upstream package

$ pip install --force pip

makes the editable install work just fine.

Thanks,

Alexander


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-5-amd64 (SMP w/12 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python-pip-whl depends on:
ii  ca-certificates  20190110

python-pip-whl recommends no packages.

python-pip-whl suggests no packages.

-- no debconf information



More information about the Python-modules-team mailing list