Closed tehasdf closed 4 years ago
(vv) root@ec10a6ce7fa3:/tmp/wagon# python -m wagon create .
Could not import linux_distribution from distro or from platform. To build or repair wagons on python 3.8+, install distro (eg. by installing wagon[distro].
(vv) root@ec10a6ce7fa3:/tmp/wagon# pip install '.[dist]'
Processing /tmp/wagon
(... snip ...)
(vv) root@ec10a6ce7fa3:/tmp/wagon# python -m wagon create .
Creating archive for ....
nice enough of a message, i guess
and after talking with @geokala, changed the above-quoted message to instead be what it currently is
platform.linux_distribution doesn't exist on py3.8+, and distro.linux_distribution doesn't exist if distro is not installed, of course. This makes wagon break on import.
Instead, make the import optional, and only check that the function is available in methods that actually use it, ie. create/repair (not install)