Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 743784 - dev-python/python-dotenv-0.14.0 fails tests (when dev-python/python-dotenv is not already installed)
Summary: dev-python/python-dotenv-0.14.0 fails tests (when dev-python/python-dotenv is...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sebastian Pipping
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-20 16:41 UTC by Agostino Sarubbo
Modified: 2020-11-25 13:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,33.09 KB, text/plain)
2020-09-20 16:41 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2020-09-20 16:41:06 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-python/python-dotenv-0.14.0 fails tests.
Discovered on: amd64 (internal ref: tinderbox)

NOTE:
This machine uses a clang/LLVM toolchain.
If you think that this issue is strictly related to clang/LLVM please block bug 408963. If you think that this issue is strictly related to the LLD linker, please block bug 731004.
This machine uses also GLIBC-2.32. If you think that this issue is strictly related to GLIBC please block bug 736174.
Comment 1 Agostino Sarubbo gentoo-dev 2020-09-20 16:41:08 UTC
Created attachment 661656 [details]
build.log

build log and emerge --info
Comment 2 Sebastian Pipping gentoo-dev 2020-09-20 17:42:48 UTC
Louis, do you have a minute, do you have an idea?

My analysis so far is that this is from re-enabling tests in c9fcebb00c2a27f09855bdc8f332a6bccc9f552a and that the test suite calls out to sh.dotenv in tests/test_cli.py which looks for command "dotenv" in $PATH before the package is even installed anywhere to "${D}".

I'm think we could add glue and patching a la…

  - ln -s cli.py "${WORKDIR}"/src/dotenv/__main__.py

  - Replace sh.dotenv calls by something like

      PYTHONPATH="${WORKDIR}"/src python -m dotenv

    except using Python subprocess and sys.executable
    rather than shell

…but it feels rather hacky and I'm not sure it's worth it.

What do you think?
Comment 3 Larry the Git Cow gentoo-dev 2020-09-20 19:17:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d9fd841e48b8fceca9efd6a13bd1e797219b228

commit 8d9fd841e48b8fceca9efd6a13bd1e797219b228
Author:     Louis Sautier <sbraz@gentoo.org>
AuthorDate: 2020-09-20 19:15:01 +0000
Commit:     Louis Sautier <sbraz@gentoo.org>
CommitDate: 2020-09-20 19:16:58 +0000

    dev-python/python-dotenv: make sure tests find "dotenv" in PATH
    
    Closes: https://bugs.gentoo.org/743784
    Package-Manager: Portage-3.0.7, Repoman-3.0.1
    Signed-off-by: Louis Sautier <sbraz@gentoo.org>

 dev-python/python-dotenv/python-dotenv-0.14.0.ebuild | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 4 Louis Sautier (sbraz) gentoo-dev 2020-09-20 19:18:44 UTC
(In reply to Sebastian Pipping from comment #2)
> Louis, do you have a minute, do you have an idea?
> 
> My analysis so far is that this is from re-enabling tests in
> c9fcebb00c2a27f09855bdc8f332a6bccc9f552a and that the test suite calls out
> to sh.dotenv in tests/test_cli.py which looks for command "dotenv" in $PATH
> before the package is even installed anywhere to "${D}".
> 
> I'm think we could add glue and patching a la…
> 
>   - ln -s cli.py "${WORKDIR}"/src/dotenv/__main__.py
> 
>   - Replace sh.dotenv calls by something like
> 
>       PYTHONPATH="${WORKDIR}"/src python -m dotenv
> 
>     except using Python subprocess and sys.executable
>     rather than shell
> 
> …but it feels rather hacky and I'm not sure it's worth it.
> 
> What do you think?

Hi Sebastian, I went for the easiest fix which is to use distutils_install_for_testing whose goal is to fix this kind of problem.
Comment 5 Sebastian Pipping gentoo-dev 2020-09-20 19:36:16 UTC
Excellent, thank you!