So, I was trying to add 'django-oauth-plus' (1) as an (optional) dependency for 'djangorestframework' (2), by adding it to the examples/requirements.txt file.
This ends up not working if you've cloned djangorestframework and try to install it's dependancies, as it downloads django-oauth-plus, then attempts to determine it's package_data, incorrectly picking up the files from djangorestframework as package_data and adding them to the django_oauth_plus.egg-info/SOURCES.txt manifest, then failing with a "can't copy 'examples/requirements.txt': doesn't exist or not a regular file".
IE. this fails...
hg clone https://bitbucket.org/tomchristie/django-rest-framework cd django-rest-framework virtualenv --no-site-packages --distribute --python=python2.6 env source /env/bin/activate pip install django-oauth-plus }}}
It turns out the problem is that setuptools_hg is respecting the 'directory' argument in find_files_with_lib (because it's being passed into hg.repository), but not in find_files_with_cmd (because the default 'hg locate' behavior is to find all files in the current repo, rather than to find all files in the current working directory)
There's a simple fix for this, which I've verified. Will issue the pull request shortly.