FAILED tests/test_cli.py::test_get_default_path - sh.ErrorReturnCode_1: FAILED tests/test_cli.py::test_run - sh.ErrorReturnCode_1: FAILED tests/test_cli.py::test_run_with_none_value - sh.ErrorReturnCode_1: FAILED tests/test_cli.py::test_run_with_other_env - sh.ErrorReturnCode_1: > raise exc E sh.ErrorReturnCode_1: E E RAN: /mnt/portagetmp/portage/dev-python/python-dotenv-0.14.0/work/python-dotenv-0.14.0-python3_7/test/scripts/dotenv run printenv a E E STDOUT: E E E STDERR: E Traceback (most recent call last): E File "/mnt/portagetmp/portage/dev-python/python-dotenv-0.14.0/work/python-dotenv-0.14.0-python3_7/test/scripts/dotenv", line 33, in <module> E sys.exit(load_entry_point('python-dotenv==0.14.0', 'console_scripts', 'dotenv')()) E File "/mnt/portagetmp/portage/dev-python/python-dotenv-0.14.0/work/python-dotenv-0.14.0-python3_7/test/scripts/dotenv", line 22, in importlib_load_entry_point E for entry_point in distribution(dist_name).entry_points E File "/usr/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 558, in distribution E return Distribution.from_name(distribution_name) E File "/usr/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 215, in from_name E raise Pack... (112 more, please see e.stderr)
Created attachment 674794 [details] build.log
Created attachment 674797 [details] emerge --info
I re-ran the test locally and the pass without error. The build log doesn't give much of a clue why the tests are failing. Do you have any ideas why the test are failing? Does it happen every time?
Yes, every time. But only if dev-python/python-dotenv was not yet installed. Probably https://bugs.gentoo.org/743784 was not in fact fixed.
Cannot confirm, tests run clean after uninstalling dotenv over here, just checked. Can you check if your local python-dotenv-0.14.0.ebuild contains a call to distutils_install_for_testing ?
PS: And how about 0.15.0?
Yes, this is the whole python-dotenv-0.14.0.ebuild # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 PYTHON_COMPAT=( python3_{6,7,8,9} ) DISTUTILS_USE_SETUPTOOLS=rdepend inherit distutils-r1 DESCRIPTION="Manage .env files" HOMEPAGE="https://github.com/theskumar/python-dotenv" SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="amd64 arm64 ~x86" IUSE="test" DEPEND="test? ( >=dev-python/click-5[${PYTHON_USEDEP}] dev-python/ipython[${PYTHON_USEDEP}] dev-python/mock[${PYTHON_USEDEP}] >=dev-python/sh-1.09[${PYTHON_USEDEP}] )" DOCS=( CHANGELOG.md README.md ) distutils_enable_tests pytest python_test() { # Tests call the "dotenv" command which needs to be in PATH # https://bugs.gentoo.org/743784 distutils_install_for_testing pytest -vv || die "Tests fail with ${EPYTHON}" }
0.15.0 fails tests the same way.
Created attachment 674842 [details] dir archive with 0.15.0
I'm afraid we're back at I'll need your help debugging things because I cannot reproduce it over here and the logs do not show any obvious indicators for why they are failing. (In reply to Alexey from comment #9) > Created attachment 674842 [details] > dir archive with 0.15.0 Anything that I should look at in there in particular? I don't see anything giving clues from a quick look.
> Anything that I should look at in there in particular? I hoped you would tell me :) Anything in particular I should try?
So the way I read the log is that the helpers installed by distutils_install_for_testing at [..]/test/scripts/dotenv have trouble finding package python-dotenv==0.14.0, i.e. itself. I have tried with dev-python/python-dotenv uninstalled and with /usr/bin/dotenv renamed, just to be sure, same issue. Version 0.14.0 is gone from the tree by now, so I tried again with version 0.15.0. Since there is dev-python/importlib_metadata involved in the lookup, I have tried with both version 3.3.0 and 3.4.0 installed — no issue. Alexey, does the issue occur with 0.15.0 for you as well? If yes, do you have any ideas what else we could try? Thanks!
distutils_install_for_testing recently got improved so that might be why it's not reproducible anymore: https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/distutils-r1.eclass?id=e46b7fd568352311ab6b03a7cc38b891ee561e36.
(In reply to Sam James from comment #13) > distutils_install_for_testing recently got improved so that might be why > it's not reproducible anymore: > https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/distutils-r1. > eclass?id=e46b7fd568352311ab6b03a7cc38b891ee561e36. I have taken that point now and replaced distutils_install_for_testing by distutils_install_for_testing --via-home to enforce the old behavoir. With that and "sudo emerge -C dev-python/python-dotenv" I was able to reproduce the error as reported with 0.15.0. So big thanks to Sam, I'll closed as fixed then.