CRUX

Welcome to CRUX bug tracking.
Tasklist

FS#1380 - fix for python-pip related packages

Attached to Project: CRUX
Opened by li (phi) - Friday, 24 February 2017, 18:39 GMT
Last edited by Danny Rawlins (Romster) - Saturday, 04 March 2017, 10:54 GMT
Task Type Bug Report
Category ports
Status Closed
Assigned To Danny Rawlins (Romster)
Operating System CRUX
Severity Low
Priority Normal
Reported Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi,
python3-pip does not work if python3-setuptools is not installed. But it seems
it's impossible to successfully install python3-setuptools.

If I run 'prt-get depinst python3-setuptools',
it first installs python3-appdirs, no problem,
next python3-pyparsing, here it always throw an exception:

Found existing installation: appdirs 1.4.0
Uninstalling appdirs-1.4.0:
Exception:
...

I've configured prt-get to run pkgmk as an unprevileged user with fakeroot.
The problematic line of script is python3-pyparsing/Pkgfile:19:

/usr/bin/python3/ $SRC/get-pip.py --root=$SRC/build

get-pip.py attempts to uninstall appdirs, which is impossible.

I fixed this bug by made a simple modification to get-pip.py:

sed -i 's/"--upgrade"/"--upgrade", "--upgrade-strategy", "only-if-needed"/' $SRC/get-pip.py

By adding that option to pip inside get-pip.py, it will not try uninstalling existing dependencies if possible.
It still does not work if one has an outdated dependency, but uninstalling it should sovle the problem.

See here for the reference:
https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption--upgrade-strategy
This task depends upon

Closed by  Danny Rawlins (Romster)
Saturday, 04 March 2017, 10:54 GMT
Reason for closing:  Fixed
Additional comments about closing:  Thank you for this fix.
Comment by li (phi) - Sunday, 26 February 2017, 15:58 GMT
The patch has been verified.

Loading...