I've used setuptools for a while now and, more recently, pip, to create distributions for my project, and that all works fine: commands like "python setup.py sdist", "python setup.py install" work as configured. Now I would like to use pip to install as "editable", to ease testing while I'm doing maintenance on this package. So I tried
cd \
pip install -e .\mypackage
This adds the path:c:\mypackage to C:\python27\Lib\site-packages\easy-install.pth. However, in my case this is wrong because mypackage is structured as follows:
C:\mypackage
setup.py
src
mypackage
__init__.py
...
docs
tests
so easy-install.pth should contain c:\mypackage\src, not c:\mypackage. I can manually edit easy-install.pth to add "\src" to the added path, then "import mypackage" succeeds, as it should. The same problem occurs if I run from c:\mypackage the command "python setup.py develop", so the problem is likely at the setuptools level.
The setup.py has:the
setup(
...
packages = find_packages('src'),
package_dir = {'mypackage': 'src/mypackage'},
...
)
(the only other setup parameters are text items like author, version etc, not listed since not relevant to problem).
I'd like to not have to edit the path in easy-install.pth. Looked at the docs, couldn't see anything indicating that putting the package source root in a folder separate from setup.py is a problem. What I am doing wrong?