Leo's present directory structure should be changed so that a proper package called 'leo' can be created. Indeed, Leo's present directory structure is:

leo
    leo/dist
    leo/doc/
    leo/extensions/
    leo/Icons/
    leo/modes/
    leo/plugins/
    leo/src/
    leo/test/
    leo/__init__.py
    leo/setup.py
    leo/MANIFEST

It appears that the distutils setup.py does not expect this organization; distutils looks in subfolders of the top-level leo folder to find potential packages.

A more standard way is the following:

leo # not a package!
    leo/leo # Will be a package if it contains __init__.py
        leo/leo/doc/
        leo/leo/extensions/
        leo/leo/Icons/
        leo/leo/modes/
        leo/plugins/
        leo/leo/src/
        leo/leo/test/
        leo/leo/__init__.py
    leo/dist
    leo/setup.py
    leo/MANIFEST

With this organization, a standard setup.py script will indeed create a leo package. Also the setup.py script creates the leo/dist folder and leo/MANIFEST file in the top-level leo folder, rather than in the folder corresponding the the leo package.

Note: the Aha arose (eventually) from the distinction between "root package" and "package" at http://docs.python.org/dist/python-terms.html The point is that the top-level leo folder is not a package: only the leo/leo folder can be a package.

Obviously, it will take some work to rearrange Leo's directory structure. Apparently svn makes this easier to do than cvs, so it may be worthwhile to convert to svn now.