EDIT: The exact code is on GitHub at https://github.com/edbrannin/mkdocs/tree/windows-runnable and it also fails on Linux.
I'm trying to make the script installation for mkdocs cross-platform by using the entry_points argument to setup():
entry_points={
'console_scripts': [
'mkdocs = mkdocs.mkdocs:main_entry_point',
],
},
The output from python setup.py install is here.
Running python setup.py install produces c:\Python27\lib\site-packages\mkdocs and this file in c:\Python27\Scripts\mkdocs-script.py:
#!C:\Python27\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'mkdocs==0.9','console_scripts','mkdocs'
__requires__ = 'mkdocs==0.9'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('mkdocs==0.9', 'console_scripts', 'mkdocs')()
)
When I try to run mkdocs, it says it can't find the module:
C:\>mkdocs
Traceback (most recent call last):
File "C:\Python27\Scripts\mkdocs-script.py", line 9, in <module>
load_entry_point('mkdocs==0.9', 'console_scripts', 'mkdocs')()
File "C:\Python27\lib\site-packages\distribute-0.6.34-py2.7.egg\pkg_resources.py", line 343, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Python27\lib\site-packages\distribute-0.6.34-py2.7.egg\pkg_resources.py", line 2307, in load_entry_point
return ep.load()
File "C:\Python27\lib\site-packages\distribute-0.6.34-py2.7.egg\pkg_resources.py", line 2013, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
ImportError: No module named mkdocs
...but it's clearly there:
C:\>python
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mkdocs
>>>
Any idea what I'm doing wrong?