cloudify-cosmo / wagon

Creates Wheel based archives to allow portable offline installation of Python packages and their dependencies
Apache License 2.0
108 stars 14 forks source link

Make linux_distribution optional #135

Closed tehasdf closed 4 years ago

tehasdf commented 4 years ago

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)

tehasdf commented 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

tehasdf commented 4 years ago

and after talking with @geokala, changed the above-quoted message to instead be what it currently is