Building the MAAS package fails with "ImportError: No module named bson"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
maas (Ubuntu) |
Fix Released
|
Critical
|
Raphaël Badin |
Bug Description
As seen in http://
HOME=/tmp/
/tmp/adt-
src/maasserver
Traceback (most recent call last):
File "/tmp/adt-
from provisioningser
File "/tmp/adt-
import bson
ImportError: No module named bson
debian/rules:19: recipe for target 'override_
make[1]: *** [override_
Related branches
- Gavin Panella (community): Approve
-
Diff: 37 lines (+18/-2)1 file modifiedsrc/maasserver/utils/jsenums.py (+18/-2)
tags: | added: ci |
Changed in maas (Ubuntu): | |
importance: | Undecided → Critical |
status: | Confirmed → Fix Committed |
assignee: | nobody → Raphaël Badin (rvb) |
Changed in maas (Ubuntu): | |
status: | Fix Committed → Fix Released |
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/provisionin gserver/ utils/_ _init__ .py. The problem with that is that is means that all the modules imported by src/provisionin gserver/ 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.