From bdb65e395c8f70498733708c36722debe02adc51 Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Sat, 29 Oct 2022 14:00:05 -0700 Subject: [PATCH] build-install-dumb-init: install py Append 'py' to dumb-init*/requirements-dev.txt Since https://github.com/pytest-dev/pytest/pull/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 from testing import is_alive testing/__init__.py:11: in from py._path.local import LocalPath E ModuleNotFoundError: No module named 'py._path'; 'py' is not a package Issue filed upstream: https://github.com/Yelp/dumb-init/issues/286 Signed-off-by: Tim Orling --- build-install-dumb-init.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-install-dumb-init.sh b/build-install-dumb-init.sh index 261f5f9..652299a 100644 --- a/build-install-dumb-init.sh +++ b/build-install-dumb-init.sh @@ -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