Skip to content
Snippets Groups Projects
Commit 8121c087 authored by Keith Maxwell's avatar Keith Maxwell
Browse files

community/py3-distro: add missing dependency

Before this change:

    $ sudo apk add py3-distro
    :scissors:
    $ distro --help
    Traceback (most recent call last):
      File "/usr/bin/distro", line 6, in <module>
        from pkg_resources import load_entry_point
    ModuleNotFoundError: No module named 'pkg_resources'

After this change:

    $ sudo apk add py3-distro
    :scissors:
    $ distro --help
    usage: distro [-h] [--json]
    :scissors:

The above commands were run inside docker-abuild with `dabuild sh`.

The change is required because `/usr/bin/distro` includes the line:

    from pkg_resources import load_entry_point

That means that py3-setuptools is required at runtime:

    $ python3 -c 'import pkg_resources; print(pkg_resources.__file__)'
    /usr/lib/python3.8/site-packages/pkg_resources/__init__.py
    $ apk info -q -W /usr/lib/python3.8/site-packages/pkg_resources/__init__.py
    py3-setuptools
parent ee17634e
No related branches found
No related tags found
1 merge request!6674community/py3-distro: add missing dependency
......@@ -3,14 +3,13 @@
pkgname=py3-distro
_pkgname=distro
pkgver=1.5.0
pkgrel=0
pkgrel=1
pkgdesc="A Linux OS platform information API"
options="!check" # Some tests fail
url="https://github.com/nir0s/distro"
arch="noarch"
license="Apache-2.0"
depends="python3"
makedepends="py3-setuptools"
depends="python3 py3-setuptools"
checkdepends="py3-pytest py3-pytest-cov"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment