GHC 2018-03-22

1 comment.

, https://git.io/vxlxL in Homebrew/homebrew-core
Sorry, this is not a Homebrew Python bug. I wouldn't even call it a Python bug, it's just the unfortunate way `data_files` work — there's no standard way to access them post-install. They are even treated differently by different tools (distutils, setuptools, wheel, pip) and I never bothered to understand the differences; you may read up on that if you want to. [1] might be of some use in this regard (didn't check). In fact, if you use `python setup.py install` instead of `pip install`, you may find your data files zipped up in the egg and not unpacked to the filesystem at all. Also, `install.prefix` in `distutils.cfg` is just equivalent to `--prefix` on the `setup.py install` command line, which is a perfectly valid option to specify by the user.

I would recommend `package_data`[2] instead.

By the way, you may have noticed that you've been reading "Distributing Python Modules (Legacy version)". Since you're already using setuptools, read the setuptools documentation instead.

[1] https://github.com/pypa/python-packaging-user-guide/pull/212
[2] https://setuptools.readthedocs.io/en/latest/setuptools.html#including-data-files