Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Tox envbindir mismatch using the tox-pipenv plugin #57

@ivar-lazzaro

Description

@ivar-lazzaro

tox version = 3.5.3
tox-pipenv version = 1.8.0

Running tox using tox-pipenv produces the following output:

WARNING: test command found but not installed in testenv
cmd: /Users/myself/workspace/project/venv/bin/python
env: /Users/myself/workspace/project/.tox/py36
Maybe you forgot to specify a dependency? See also the whitelist_externals envconfig setting.

Tests pass correctly, but the above warning indicates that my venv's python binary was used instead of that installed in the tox envbindir.
Digging a bit into tox code, I found the following in config.py:

def get_envbindir(self):
    """Path to directory where scripts/binaries reside."""
    if tox.INFO.IS_WIN and "jython" not in self.basepython and "pypy" not in self.basepython:
        return self.envdir.join("Scripts")
    else:
        return self.envdir.join("bin")

where envdir points to "/Users/myself/workspace/project/.tox/py36", whereas tox-pipenv creates the virtual environment in /Users/myself/workspace/project/.tox/py36/.venv

If I try to override envdir in my tox.ini to point to .tox/py36/.venv, then tox creates .tox/py36/.venv/.venv :)

Adding "python" to whitelist_externals suppresses the warning, but I wonder if envdir shouldn't point to the actual environment directory instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions