← Back to team overview

maas-devel team mailing list archive

Repackaging MAAS

 

Hi Matthias, Barry,

I have a big branch to change the way that MAAS is packaged, in the
Python sense, and Andres has asked me to get your advice.

Currently there's a single setup.py file in MAAS that isn't very
representative of much. For example, it includes some dependencies,
but far from all. The most important thing it contains is the
data_files setting. It's used to build _something_ that is then sliced
and diced into a few different binary packages.

My branch - lp:~allenap/maas/repackage - splits up things into 6
separate Python packages, each of which should correspond to a single
binary .deb package. After this change, lp:maas would contain 6 Python
projects in subdirectories, each with their own setup.py, plus some
common code that's there to bring up the development environment.

I've carefully crafted each setup.py to have all the necessary Python
dependencies, as well as a list of Ubuntu packages from which they can
be obtained. There's a distutils command to install Ubuntu packages
when needed, as an aid to development.

I say distutils, I actually mean setuptools. This should also mean
that installed packages can benefit from pkg_resources, and I've used
it in several places.

This is a big and disruptive change, and is going to cause some amount
of pain while we adjust packages and so forth, but I think it's good
for MAAS. Right now there's too much munging going on during the .deb
packaging phase; a Python package built from the current "global"
setup.py would not actually work properly.

This was useful during the early days of MAAS, when we were working on
borrowed time, vapours, and a yet-to-be-developed understanding of how
everything would fit together, but it's limiting now. I'd like to get
to the point where the MAAS packages are as "no-op" as possible, with
little to no munging.

Do you have any reservations about this change, from an Ubuntu
packaging and a Python packaging perspective? I don't expect you to
review >5000 lines of diff, I just want to check the sanity of this.
If you want more detail but are pressed for time, I can do a call with
you to answer your questions.

Thanks!

Gavin.