Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

develop uninstall doesn't remove executables #175

Open
ghost opened this issue Mar 25, 2014 · 3 comments
Open

develop uninstall doesn't remove executables #175

ghost opened this issue Mar 25, 2014 · 3 comments

Comments

@ghost
Copy link

ghost commented Mar 25, 2014

Originally reported by: schlamar (Bitbucket: schlamar, GitHub: schlamar)


Running python setup.py develop -u only removes the link in the pth file but it does not remove previously created executables in the Scripts folder under Windows.


@ghost
Copy link
Author

ghost commented Jun 21, 2014

Original comment by joelkim (Bitbucket: joelkim, GitHub: joelkim):


Same problem. Can anybody fix it?

@ghost
Copy link
Author

ghost commented Dec 18, 2015

Original comment by bwanamarko (Bitbucket: bwanamarko, GitHub: Unknown):


It also does not remove any dependencies that may have been added to easy-install.pth

EG: a development project with requires numpy==1.9.0 in setup.py but numpy-1.9.3 is already installed in site-packages

  • python setup.py develop downloads numpy-.1.9.0
    1. builds it and creates numpy-1.9.0-py<major>.<minor>-<platform>-<archtype>.egg in site-packages,
    2. adds it to easy-install.pth and
    3. also adds f2py.py script to bin/ (or Scripts/ on windows)
  • python setup.py develop --uninstall only removes my-dev-proj.egg-link from site-packages and path to the developement project in easy-install.pth
    • the dependencies' scripts are left in bin,
    • dependencies' eggs are left in site-packages and
    • the paths to the eggs are left in easy-install.pth

stdout:

$ python setup.py develop --uninstall
running develop
Removing c:\python27\lib\site-packages\my-dev-proj.egg-link (link to .)
Removing my-dev-proj 0.0.1 from easy-install.pth file

$ ls -al --sort=time --reverse /c/Python27/Scripts/
...
-rwxr-xr-x 1 mmikofski 1049089    169 Dec 18 10:19 f2py.py*  <-- still here!

$ cat /c/Python27/lib/site-packages/easy-install.pth
import sys; sys.__plen = len(sys.path)
./numpy-1.9.0-py2.7-win-amd64.egg  # <-- still here!
...

$ ls -al --sort=time --reverse /c/Python27/lib/site-packages/ | grep numpy
drwxr-xr-x 1 mmikofski 1049089       0 Oct  2 08:37 numpy/  <-- original installation
drwxr-xr-x 1 mmikofski 1049089       0 Oct  2 08:37 numpy-1.9.3.dist-info/  <-- original installation
drwxr-xr-x 1 mmikofski 1049089       0 Dec 18 10:19 numpy-1.9.0-py2.7-win-amd64.egg/  <-- still here!

I will try to hack on this if I have time. I greatly appreciate Setuptools, pypa and this new ecology of distributing and managing python packages. I think using develop together with a virtual environment maybe a robust solution. Perhaps in the long run they can be integrated, but in the short term something can be added to the documentation.

Thanks!

@ghost
Copy link
Author

ghost commented Dec 23, 2015

Original comment by embray (Bitbucket: embray, GitHub: embray):


God help anyone using ./setup.py develop and not using a virtualenv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant