[issue27317] Handling data_files: too much is removed in uninstall

Sylvain Corlay report at bugs.python.org
Tue Jun 14 07:49:30 EDT 2016


New submission from Sylvain Corlay:

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.

Example:

```
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.

----------
components: Distutils
messages: 268551
nosy: dstufft, eric.araujo, sylvain.corlay
priority: normal
severity: normal
status: open
title: Handling data_files: too much is removed in uninstall
type: behavior
versions: Python 3.6

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


More information about the Python-bugs-list mailing list