[issue12405] packaging does not record/remove directories it creates

Carl Meyer report at bugs.python.org
Tue Oct 18 20:18:24 CEST 2011


Carl Meyer <carl at dirtcircle.com> added the comment:

> This is what I proposed earlier: we’d need to record all directories that would have been created, but I’m not sure if it will be possible.  For example, if one uses --prefix /tmp/usr and pysetup install creates /tmp/usr, /tmp/usr/lib, /tmp/usr/lib/python2.7, /tmp/usr/lib/python2.7/site-packages, /tmp/usr/lib/python2.7/site-packages/spam and /tmp/usr/lib/python2.7/site-packages/Spam-0.1.dist-info, then we pysetup should Spam, should packaging remove only the package and dist-info directories or also the site-packages, python2.7, lib and usr directories?

I think it would make sense to draw a distinction between "creating the prefix directories (including site-packages)" and "creating the distribution-specific directories within the prefix directories." And only record the latter in RECORD for the given installed distribution.

If I use --prefix and install some things, and then uninstall them, I would not consider it a bug to find the empty site-packages directory still remaining under that prefix. (In fact, I'd be surprised if it were removed).

> Okay, so I will champion a patch to PEP 376.

Thank you!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12405>
_______________________________________


More information about the Python-bugs-list mailing list