Comment 1 for bug 1346279

Revision history for this message
Raphaƫl Badin (rvb) wrote : Re: MAAS requires explicit dependency on python-bson

The utility in src/maasserver/utils/jsenums.py is used when building the package. It uses the map_enum utility that recently from moved over to src/provisioningserver/utils/__init__.py. The problem with that is that is means that all the modules imported by src/provisioningserver/utils/__init__.py must be present as "build dependencies" in the packaging.

I see three possible solutions here:

- Add all the required dependencies as build dependencies in the packaging.

- Move map_enum in a place where it can be imported in isolation without triggering a ton of imports

- Add a copy of the code of map_enum in src/maasserver/utils/jsenums.py instead of importing the shared map_enum.