This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Handling data_files: too much is removed in uninstall
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.6
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, eric.araujo, steve.dower, sylvain.corlay
Priority: normal Keywords:

Created on 2016-06-14 11:49 by sylvain.corlay, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg268551 - (view) Author: Sylvain Corlay (sylvain.corlay) * Date: 2016-06-14 11:49
When specifying an empty list for the list of data_files in a given directory, the entire directory is being deleted on uninstall of the wheel, even if it contained other resources.


from setuptools import setup

setup(name='remover', data_files=[('share/plugins', [])])

The expected behavior is that only the specified list of files is removed, (which is empty in that case).

When the list is not empty, the behavior is the one expected. For example

from setuptools import setup

setup(name='remover', data_files=[('share/plugins', ['foobar.json'])])

will only remove `foobar.json` on uninstall and the `plugins` directory will not be removed if it is not empty.
msg386369 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:21
Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at
Date User Action Args
2022-04-11 14:58:32adminsetgithub: 71504
2021-02-03 18:21:53steve.dowersetstatus: open -> closed

nosy: + steve.dower
messages: + msg386369

resolution: out of date
stage: resolved
2016-06-14 11:49:30sylvain.corlaycreate