FS#60878 - [python-pip] Package contains an empty bash-completion file for pip.

Attached to Project: Arch Linux
Opened by Dmitry Kuzmenko (mallrat) - Wednesday, 21 November 2018, 14:30 GMT
Last edited by Eli Schwartz (eschwartz) - Thursday, 18 July 2019, 15:41 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Dan McGee (toofishes)
Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The package python-pip contains bash-completion file /usr/share/bash-completion/completions/pip that was correct in 10.0.1 version of package and is empty in 18.0.1. So completion doesn't work.

Additional info:
* python-pip 18.0-1
* config and/or log files etc. N/A


Steps to reproduce:
* install bash-completion and python-pip packages
* open new bash instance
* type pip and press <tab> twice
* expected: list of pip commands
* result: nothing is happening
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Thursday, 18 July 2019, 15:41 GMT
Reason for closing:  Fixed
Additional comments about closing:  was fixed in python-pip 18.1-1
Comment by Eli Schwartz (eschwartz) - Wednesday, 21 November 2018, 15:01 GMT
The python 3.7 rebuild failed to update the command which generated the completion file:

PYTHONPATH="$pkgdir"/usr/lib/python3.6/site-packages "$pkgdir"/usr/bin/pip completion --bash

Package errors during package with:
```
Traceback (most recent call last):
File "/build/python-pip/pkg/python-pip/usr/bin/pip", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3126, in <module>
@_call_aside
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 581, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 898, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 784, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==18.0' distribution was not found and is required by the application
```

I suggest using instead, PYTHONPATH="$PWD/build/lib/" python -m pip completion --bash

Loading...