Skip to content

Commit

Permalink
build-install-dumb-init: install py
Browse files Browse the repository at this point in the history
Append 'py' to dumb-init*/requirements-dev.txt

Since pytest-dev/pytest#10396 the py library is
no longer installed, but dumb-init needs 'py._path'.

Fixes:

ImportError while importing test module '/tmp/tmp.k8zSDBKT6S/dumb-init-1.2.5/tests/child_processes_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/child_processes_test.py:10: in <module>
    from testing import is_alive
testing/__init__.py:11: in <module>
    from py._path.local import LocalPath
E   ModuleNotFoundError: No module named 'py._path'; 'py' is not a package

Issue filed upstream:
Yelp/dumb-init#286

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
  • Loading branch information
moto-timo committed Oct 29, 2022
1 parent 4687583 commit ee44ce1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build-install-dumb-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ sha256sum -c sha256sums || exit 1
tar xf v1.2.5.tar.gz || exit 1
# https://github.com/Yelp/dumb-init/issues/273
sed -i '128 i \ \ \ \ packages=[],' dumb-init*/setup.py || exit 1
# https://github.com/Yelp/dumb-init/issues/286
echo py >> dumb-init*/requirements-dev.txt

# Replace the versions of python used for testing dumb-init. Since it is
# testing c code, and not python it shouldn't matter. Also remove the
Expand Down

0 comments on commit ee44ce1

Please sign in to comment.