[Distutils] Clearing WorkingSet in pkg_resources. . . ?

David Lyon david.lyon at preisshare.net
Sun May 17 06:55:38 CEST 2009


On Sun, 17 May 2009 00:43:20 -0400, "P.J. Eby" <pje at telecommunity.com>
wrote:

>>So after I deinstall, the package is still shown, even though it's
>>no longer in the system. It's still in the interpretors memory.
> 
> Do you mean on sys.path?  If it's an .egg file or directory on 
> sys.path it will probably still be listed as a distribution when you 
> create a new WorkingSet.  Either that, or it's an .egg-info egg whose 
> .egg-info you didn't delete.

I have to restart the program for the refresh to work...

Ideally, I would like to see the package list refreshed immediately
after a package is installed or removed. I can make a work around
and hide packages that are deinstalled, but i was hoping to find
an easier way.

  Checking for C:\Python25\scripts\easy_install.exe
  Running installer ... C:\Python25\scripts\easy_install.exe demset
  Searching for demset
  Reading http://pypi.python.org/simple/demset/
  Reading http://deron.meranda.us/python/demset/
  Best match: demset 1.0
  Downloading http://deron.meranda.us/python/demset/dist/demset-1.0.tar.gz
  Processing demset-1.0.tar.gz
  Running demset-1.0\setup.py -q bdist_egg --dist-dir
c:\docume~1\david\locals~1\temp\easy_install-ozryy7\demset-
1.0\egg-dist-tmp-jiy7q0
  zip_safe flag not set; analyzing archive contents...
  Adding demset 1.0 to easy-install.pth file
  Installed c:\python25\lib\site-packages\demset-1.0-py2.5.egg
  Processing dependencies for demset
  Finished processing dependencies for demset

Preparing to remove demset 
 - package mentioned in PTH c:\python25\lib\site-packages\easy-install.pth
 - Updating PTH c:\python25\lib\site-packages\easy-install.pth
 - Removing Egg c:\python25\lib\site-packages\demset-1.0-py2.5.egg
 - deinst completed  demset




More information about the Distutils-SIG mailing list