make build is using charmcraft python pkg in tox and failed for missing dependency

Bug #1960867 reported by Joe Guo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charm-cloudstats
Fix Released
Medium
Joe Guo

Bug Description

Currently charm build is triggered via:

make build -> tox -e build -> charmcraft python pkg in venv

The charmcraft python pkg deps on python3-apt, and then python3-distutils-extra,

build will fail for missing `DistUtilsExtra` since it only has deb pkg but no python pkg:

```
ERROR: Command errored out with exit status 1:
   command: /home/guoqiao/charms/charm-cloudstats/.tox/build/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-v9pscss6/python-apt_6a62d0f42e9b439098faee7649c06c59/setup.py'"'"'; __file__='"'"'/tmp/pip-install-v9pscss6/python-apt_6a62d0f42e9b439098faee7649c06c59/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-d1tcxsmt
       cwd: /tmp/pip-install-v9pscss6/python-apt_6a62d0f42e9b439098faee7649c06c59/
  Complete output (5 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-v9pscss6/python-apt_6a62d0f42e9b439098faee7649c06c59/setup.py", line 6, in <module>
      from DistUtilsExtra.command import *
  ModuleNotFoundError: No module named 'DistUtilsExtra'
```

We may need to switch to snap to avoid this issue.

Related branches

Joe Guo (guoqiao)
Changed in charm-cloudstats:
status: New → Confirmed
status: Confirmed → In Progress
importance: Undecided → Medium
assignee: nobody → Joe Guo (guoqiao)
Joe Guo (guoqiao)
summary: - make build is using charmcraft python pkg in tox and failedn for missing
+ make build is using charmcraft python pkg in tox and failed for missing
dependency
Joe Guo (guoqiao)
Changed in charm-cloudstats:
status: In Progress → Fix Committed
Chi Wai CHAN (raychan96)
Changed in charm-cloudstats:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.