Hi everyone,

I've been working on figuring out the best way to get packing for Quantum going. Here is my proposal on how to proceed.

To keep in line with how Nova does things, I think we should use Python's setuptools to manage building packages (with a supplemental build script for Debian packaging). Using setup tools's namespace packages <http://packages.python.org/distribute/setuptools.html#namespace-packages> we can split Quantum up into multiple chunks that can be installed separately, but all reside underneath a single Quantum namespace on the system.

In order to accommodate that, we'll need to break the Quantum structure up into directories for each individual package. I'm proposing we break it up like so:

    quantum/
        __init__.py
        core/
            __init__.py
            manager.py
            service.py
/    wsgi.py
/    setup.py
//    client/
            __init__.py
            client.py
            cli.py
            setup.py
        tests/
            __init__.py
            unit/
                __init__.py
                test_api.py
                testlib_api.py
            setup.py
        common/
            __init__.py
/    serilizer.py
            utils.py
/setup.py
/
/(Just listing some of the file to help get a sense of what would go where). Essentially, the tests and all client related code would be broken out into their respective directories. The "core" (or whatever we call it), would contain the code that runs the server, etc. The common directory would contain tools used by multiple packages, and would be a dependency to them. Lastly, plugins will be able to package themselves under the quantum namespace, so distributing plugins will be simple.

The italicized files will need to be reorganized to fit properly with the new layout.

With a structure like this, we could build each project with "python setup.py bdist_rpm". It'd be trivial to include a script that builds all of them. Like in Nova, a shell script could be used to build the Debian packages.

When these packages are installed, the namespace packaging will allow them to see each other and work together.

Please comment/ask questions. I'm not extremely familiar with packing Python projects, so I'd love any suggestions/advice.

Thanks,
-Tyler Smith

--
Mailing list: https://launchpad.net/~netstack
Post to     : netstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~netstack
More help   : https://help.launchpad.net/ListHelp

Reply via email to