ferno/greenery — pull request #8 by pjkundert (2013-05-06 17:12:21+00:00)
Title: Convert greenery into a package

Converted greenery into a package, with minimal disturbance to source directory
structure. In particular, the provided setup.py (based on distutils) packages up
contents of the root project directory and ships its as 'greenery' for installation.

The sole drawback is that to execute an import of greenery from code running
within the greenery package directory itself, the current directory has to be added
to the sys.path, it it must be named greenery. This is a minor inconvenience, as it
is only required for self-test code (in fsm.py and lego.py), and example code (main.py)

Just run python/python3 setup.py install to make 'import greenery' available to any python/python3 code running on the host.

o Pull fsm.py and lego.py symbols into greenery namespace in __init__.py
o Enable relative imports from main.py and in "__main__" test sections of fsm.py
and lego.py on direct execution, by manually loading module.
o Convert all intra-package imports to explicit relative imports
o Avoid some O(N) performance for large FSMs
o Added distutils based setup.py packaging
o Set __version__ to '1.0', specified separately in simple _version.py
o Tested in Python 2.7/3.3