Add mockfs.util for sanitize(), merge_dicts() and friends

Signed-off-by: David Aguilar <davvid@gmail.com>
Move the MockFS implementation to mockfs.mfs and eliminate globals

mockfs.install() now returns the newly-created mockfs instance.
The original API used module globals and always created a singleton
instance within the mockfs module.  We now create a new instance
every time.

The documentation examples now reflect the updated API.
This makes things more transparent and removes the need for us
to provide the singleton() function and the global variables
that come along with it.

Signed-off-by: David Aguilar <davvid@gmail.com>
setup.py: Fix copy/paste typo

I copied setup.py from jsonpickle and didn't notice that
I hadn't updated all of the values for mockfs.

Signed-off-by: David Aguilar <davvid@gmail.com>
Update copyright notices for 2010

Signed-off-by: David Aguilar <davvid@gmail.com>
.gitignore: Add /build

Signed-off-by: David Aguilar <davvid@gmail.com>
mockfs: Update docstrings to show a complete example unit test

Signed-off-by: David Aguilar <davvid@gmail.com>
setup.py: Prefer distutils over setuptools

distutils.setup does not require us to touch $PYTHONPATH
in order to install stuff to non-standard locations so use
it instead of setuptools.  We don't need setuptools' fancy
features so let's keep it simple.

Signed-off-by: David Aguilar <davvid@gmail.com>
setup.py: Use the description string from mockfs.mfs.__doc__.

Signed-off-by: David Aguilar <davvid@gmail.com>
setup.py: Change development status to "Stable"

Signed-off-by: David Aguilar <davvid@gmail.com>
Add a Makefile to automate common tasks

Signed-off-by: David Aguilar <davvid@gmail.com>
mockfs: Update API version to 0.6.0

Plans for the 0.6.x series include adding support for the glob module.
These will be introduced in subsequent 0.6.1+ releases.

Signed-off-by: David Aguilar <davvid@gmail.com>
mockfs.mfs: Update docstrings to reference the Python standard library

Signed-off-by: David Aguilar <davvid@gmail.com>
.gitmodules: Update submodule URL for sphinx-to-github

Signed-off-by: David Aguilar <davvid@gmail.com>
utils: Add build_nested_dir_dict()

Signed-off-by: David Aguilar <davvid@gmail.com>
mockfs: raise OSError when doing os.listdir() on non-existent paths

Signed-off-by: David Aguilar <davvid@gmail.com>
mockfs: Add os.remove()

Signed-off-by: David Aguilar <davvid@gmail.com>
mockfs: Add os.rmdir()

Signed-off-by: David Aguilar <davvid@gmail.com>
mockfs: Add os.makedirs()

Signed-off-by: David Aguilar <davvid@gmail.com>
mockfs: Add copytree() helper

We do not expose this to the global modules but we provide
it so that users can do recursive copies internally.

Signed-off-by: David Aguilar <davvid@gmail.com>
Makefile: Create directories when building docs

Signed-off-by: David Aguilar <davvid@gmail.com>