kennethreitz/clint — Issue #33: data files installed in the wrong location
Author: hannosch
Created: 2012-01-26 16:08:12+00:00
State: open

The fix for issue 22 introduced a new problem. The data files are now installed in the top folder of the environment.

To reproduce do:

$ virtualenv-2.6 --distribute venv
New python executable in venv/bin/python2.6
...
$ cd venv/
$ bin/pip install clint
Downloading/unpacking clint
Running setup.py egg_info for package clint
Installing collected packages: clint
Running setup.py install for clint
warning: install_data: setup script did not provide a directory for 'README.rst' -- installing right in '/opt/tmp/venv'
warning: install_data: setup script did not provide a directory for 'HISTORY.rst' -- installing right in '/opt/tmp/venv'
Successfully installed clint
Cleaning up...
$ ls
HISTORY.rst	README.rst	bin	include	lib

distutils even warns about this. In my case my own readme/history files are overwritten by this.

I think to solve the issue you had, you just want to use a MANIFEST.in which will tell distutils to include the files in the sdist. There's no need to actually install them on the target system. If you want to install them as well, I'd use setuptools/distribute include_package_data option (http://packages.python.org/distribute/setuptools.html#including-data-files).