tomchristie/mkdocs — pull request #96 by edbrannin (2014-06-08 02:12:54+00:00)
Title: Windows: Cross-platform "mkdocs" command with setuptools-builtins

Changed the way we're asking setuptools to generate the `mkdocs` command, such that it works on all platforms.

This is based on how Fabric and a bunch of other commands generate their command scripts, [as described here](https://github.com/tomchristie/mkdocs/pull/72#issuecomment-44468568).

Tested on OS X and Windows XP. This doesn't completely solve Windows-compatibility (there's at least a slash-direction issue I'll look into next), but this is an important first step.

To make this work, I had to:

* Rename the source file for `mkdocs` to `mkdocs.py` (the generated command is still `mkdocs`)
* Make a new "main" function from the if-block in mkdocs.py
* Changed from `scripts=` to `entry_points=` in setup.py
* To make the resulting script run, I had to change all the `mkdocs`-`import`s from within the `mkdocs` package to use relative paths.

This supersedes #72.