If uninstalling a editable package in Python 2.7 that was installed using a UNC file path, the path is not removed from the easy-install.pth file.
In python 3.7 the unc file path is removed from the pth file when pip uninstall is run. This should also work in python 2.7. The problem is that in python 2, os.path.splitdrive does not work on unc file paths. Pip is checking for absolute paths, this can be handled by the os.path.isabs function, that works in both python 2 and 3 and is specifically for checking if a path is absolute.
While Python 2 is being deprecated at the end of the year, this fix makes the code clearer, and adds unit tests for .pth files. The main reason I would like to see this go through is because I will need to support the python that ships with Maya/3ds Max/Nuke, etc on windows until we stop using them. Given that python 3 support is only just getting added to these applications, I'm going to have to support python 2 for a while on windows environments.
Verify that \\source\source\dev\mikeh\_checkouts\qtpy was added to easy-install.pth
pip uninstall Qt.py
\\source\source\dev\mikeh\_checkouts\qtpy was not removed from easy-install.pth.
Substitute Qt.py for your pip package checkout of choice.
C:\>pip install -e \\source\source\dev\mikeh\_checkouts\qtpy
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Looking in indexes: https://pip.blur.com/blur/dev/+simple/
Installing collected packages: Qt.py
Running setup.py develop for Qt.py
Successfully installed Qt.py
C:\>pip uninstall qt.py
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for
Proceed (y/n)? y
Successfully uninstalled Qt.py-1.0.0b3
I will submit a pull request shortly.
The text was updated successfully, but these errors were encountered: