setup.py does not find module
Closed this issue · 3 comments
Get a local copy to play with in the usual python way...
- git clone Gelatin
- cd Gelatin
- python setup.py develop
Unhappy failure
$ gel
Traceback (most recent call last):
File "/usr/local/bin/gel", line 7, in <module>
execfile(__file__)
File "/Users/fish/Projects/Gelatin/gel", line 19, in <module>
from Gelatin import __version__, generator
ImportError: No module named Gelatin
This is easily fixed with ln
ln -s src/Gelatin Gelatin
ENV
I'm using Python 2.6 on OSX 10.6
Frankly, I don't yet understand what is the right way to fix this. From your suggested fix it seems as though "setup.py develop" creates a link to the root directory of the Gelatin repository. However, I found nothing in the setuptools docs on how to instruct setuptools to point to the src/ directory instead.
Creating additional links in the root of Gelatin's package does not seem like the right solution. (In addition, I don't know how symlinks are handled on Windows platforms.)
Frankly I'm not sure how this should be fixed either. I was not trying to suggest you add a symlink, I was just trying to point out that setup tools was expecting the Gelatin folder (the module it's self) to be in the root, not in the src/ folder.
Most projects have the module folder in the root of the project and that does seem to be the broad default. I wouldn't be surprised if there was a way to get setup tools to look in src... but it's clearly not doing that at the moment.