On Thu, Apr 7, 2011 at 6:33 AM, David Cournapeau firstname.lastname@example.org wrote:
On Thu, Apr 7, 2011 at 11:01 AM, Bruce Southey email@example.com wrote:
Hi, I tend to get files left behind for 32-bit versions of Python 3.1 and Python3.2 usually after I have ran the tests and then immediately try to uninstall it using the Windows uninstaller via control panel.
With Python 3.1 files are left behind have the '.pyd' suffix: C:\Python31\Lib\site-packages\numpy\linalg\lapack_lite.pyd C:\Python31\Lib\site-packages\numpy\fft\fftpack_lite.pyd
With Python 3.2, most are in the __pycache__ directories. I do not see these __pycache__ directories with Python3.1 binary installer.
__pycache__ is a feature added in python 3.2 to my knowledge: http://www.python.org/dev/peps/pep-3147
This looks like a bug in distribute. I find the same .pyc files right beside the source .py files as in __pycache__/filename.cpython-32.pyc. I'm guessing the former are created during the byte-compiling step at install time while the latter are created on the first import. Only the latter should be present according to PEP 3147.
Also can people with Windows check that ticket 144 (Uninstall in Windows does not remove some directories) is still valid? http://projects.scipy.org/numpy/ticket/1466
The numpy NSIS script does not contain any uninstall info. The default uninstall mode seems to be to create a log of files that was installed, and deleting those when the uninstaller is run. This causes the above __pycache__ issue as well as #1466 (the user ran coverage.py it seems, has left-over .cover files that are not cleaned up). I don't have a Windows machine to test, but #1466 must still be valid.
The alternative would be to tell the uninstaller to delete the complete site-packages/numpy/ dir no matter what's in it. That's probably the right way to do it.