tox-dev / tox-pipenv

A pipenv plugin for Tox
MIT License
124 stars 30 forks source link

Editable option seems to be not taken in count #46

Closed matthieugouel closed 5 years ago

matthieugouel commented 6 years ago

Hello, First of all, thanks for this project !

I use tox with tox-pipenv inside the virtualenv of the project to run tests. I know that it's originally designed to be used outside the virtualenv but I admint that it's easier not to exit the virtualenv each time I run tox.

Everything is working nicely besides a warning "WARNING:test command found but not installed in testenv" but I think it's related to the issue #6 (even if this warning is appearing since the first time for me). My problem is that it seems to change the editable option of a package in the virtualenv. Before running tox I have a pip list like this :

....
flake8                   3.5.0
gibica                   0.5.0     /Users/matthieu/Documents/Informatique/python/gibica
idna                     2.7
...

And after have run tox :

...
flake8                   3.5.0
gibica                   0.5.0
idna                     2.7
...

My Pipfile looks like this :

...

[packages]
click = "*"
gibica = {editable = true, path = "."}

[dev-packages]
"flake8" = "*"
tox = "*"
tox-pipenv = "*"
pytest = "*"
pytest-cov = "*"
coverage = "*"
coveralls = "*"
mypy = "*"
bumpversion = "*"
black = "*"
Sphinx = "*"
sphinx_rtd_theme = "*"
gibica = {editable = true, path = "."}

...

So I don't know why but It seems that tox-pipenv modifies the actual virtualenv and doesn't handle the editable option properly... or maybe I miss something !

After a pipenv install --dev inside the virtualenv the package is in editable option again.

Have a good day, Matthieu.

EDIT:

Oh and this is the content of my tox.ini configuration file :

[tox]
envlist = format, lint, type, test

[testenv]
commands =
    format: black --py36 --line-length 88 --skip-string-normalization gibica tests
    lint: flake8 gibica tests
    type: mypy gibica
    test: py.test --cov=gibica
tonybaloney commented 5 years ago

I just made a fix in #56 which I think will fix your issue

tonybaloney commented 5 years ago

Released in 1.7.0