Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-19 Thread Vinay Sajip
Daniel Holth dholth at gmail.com writes: If you want eby-style uninstall to be fast, index record in sqlite in a post-install hook. I'm not sure what you mean by Eby-style uninstall, but uninstalling is already fast enough, AFAIK. I'm horrified that overwrite any file on my system is a

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-19 Thread Eric V. Smith
On 02/19/2013 05:18 AM, Vinay Sajip wrote: I've implemented it now in distlib, and it seems to work as far as it goes (no consideration has been given to namespace packages yet). Speaking of namespace packages, 2 points: 1. When deleting, you must either be aware of namespace packages and/or

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-19 Thread Vinay Sajip
Eric V. Smith eric at trueblade.com writes: Speaking of namespace packages, 2 points: 1. When deleting, you must either be aware of namespace packages and/or make sure to not delete source or .py[co] files that you did not install. One distribution could install foo.bar, and another then

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-19 Thread PJ Eby
On Tue, Feb 19, 2013 at 9:20 AM, Eric V. Smith e...@trueblade.com wrote: 2. Does the metadata need to contain information about namespace packages? It's settable in distribute/setuptools' setup.py. I'm not sure if the need for it has been obviated by PEP 420 or not. I don't think distutils or

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-18 Thread Vinay Sajip
PJ Eby pje at telecommunity.com writes: Yes - it's unnecessary for library directories (e.g. stuff under site-packages). You may safely remove any empty subdirectory of the directories containing the .dist-info, that is a parent of any of the files belonging to the distribution you are

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-18 Thread Daniel Holth
On Feb 18, 2013 3:32 AM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: PJ Eby pje at telecommunity.com writes: Yes - it's unnecessary for library directories (e.g. stuff under site-packages). You may safely remove any empty subdirectory of the directories containing the .dist-info, that is

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-17 Thread Daniel Holth
On Sat, Feb 16, 2013 at 8:23 AM, Nick Coghlan ncogh...@gmail.com wrote: On Sat, Feb 16, 2013 at 10:57 PM, Eric V. Smith e...@trueblade.com wrote: On 2/16/2013 7:40 AM, Vinay Sajip wrote: With my suggestion about keeping a list of shared locations around, then namespace package directories

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-17 Thread PJ Eby
On Sat, Feb 16, 2013 at 7:08 AM, Nick Coghlan ncogh...@gmail.com wrote: The main problem I can see is with namespace packages: you could get a Do you want to delete this directory? every time you uninstalled a distribution that contributed files to a namespace package. Actually, the idea of

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-17 Thread PJ Eby
On Sat, Feb 16, 2013 at 7:40 AM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Nick Coghlan ncoghlan at gmail.com writes: That suggests to me that a separate clean command in the PEP 376 aware tools would be a better choice, where it looks for directories that are either empty or contain only

[Distutils] PEP 376, Uninstallation and interoperability

2013-02-16 Thread Vinay Sajip
I've been thinking about uninstallation of distributions, and it seems possible that PEP 376 is underspecified if we want uninstallation to work interoperably between different tools that implement the PEP. It seems desirable that uninstallation should undo the process of installation as far as

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-16 Thread Chris Jerdonek
On Sat, Feb 16, 2013 at 12:42 AM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Another question arises - what is to be done when directories, which are meant to be deleted during uninstallation, contain files which were not put there during installation of the distribution being removed? It would

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-16 Thread Paul Moore
On 16 February 2013 09:58, Chris Jerdonek chris.jerdo...@gmail.com wrote: On Sat, Feb 16, 2013 at 12:42 AM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Another question arises - what is to be done when directories, which are meant to be deleted during uninstallation, contain files which were not

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-16 Thread Nick Coghlan
On Sat, Feb 16, 2013 at 9:49 PM, Paul Moore p.f.mo...@gmail.com wrote: On 16 February 2013 09:58, Chris Jerdonek chris.jerdo...@gmail.com wrote: On Sat, Feb 16, 2013 at 12:42 AM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Another question arises - what is to be done when directories, which

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-16 Thread Vinay Sajip
Paul Moore p.f.moore at gmail.com writes: The obvious example is pyc/pyo files. Yes, and these could be deleted even if they are not in the RECORD file (they would be if byte-compiling is done at installation time, but not otherwise). It would be good to cater better for clean uninstalls.

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-16 Thread Vinay Sajip
Nick Coghlan ncoghlan at gmail.com writes: That suggests to me that a separate clean command in the PEP 376 aware tools would be a better choice, where it looks for directories that are either empty or contain only __pycache__ subdirectories. Such That seems to suggest that you can't be sure

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-16 Thread Eric V. Smith
On 2/16/2013 7:40 AM, Vinay Sajip wrote: With my suggestion about keeping a list of shared locations around, then namespace package directories could be kept in such a list. When uninstalling, all the subpackages added in the particular distribution being uninstalled would be removed, but

Re: [Distutils] PEP 376, Uninstallation and interoperability

2013-02-16 Thread Nick Coghlan
On Sat, Feb 16, 2013 at 10:57 PM, Eric V. Smith e...@trueblade.com wrote: On 2/16/2013 7:40 AM, Vinay Sajip wrote: With my suggestion about keeping a list of shared locations around, then namespace package directories could be kept in such a list. When uninstalling, all the subpackages added