Python setuptools setup.cfg data_fils

Setuptools 40.6 added section [options.data_files] to setup.cfg. Having setuptools < 40.6 results in this error upon trying to install a Python package:

distutils.errors.DistutilsOptionError: Unsupported distribution option section: [options.data_files]

Fix: upgrade setuptools via:

conda install setuptools


pip install --upgrade setuptools

Where are data_files placed

A setup.cfg might contain [options.data_files] section like:

share/myprogram/data =

This places the files under Python sys.prefix /share/myprogram/data

For example, ~/miniconda3/share/myprogram/data/stuff.txt