1. Holger Krekel
  2. tox

Issues

Issue #93 new

Environment is not recreated when install_requires in setup.py is changed

Takafumi Arakaki
created an issue

Here is a recipe to reproduce this problem.

  1. Run tox in some project.
  2. Add a new package to install_requires in setup.py
  3. Run tox again.

I can write dependency in tox.ini to force recreate, but I think it is simpler if tox reinstall package. I think it is as easy as removing --no-deps flag so I wonder why --no-deps is used in the first place. Is there any drawbacks? Wouldn't it be nice if we can disable this flag optionally?

Comments (10)

  1. Holger Krekel repo owner

    Some time ago someone else complained that reinstalling a package would always re-install the dependencies, increasing overall run time. Changing install_requires is a relatively rare event -- can you not issue --recreate on this occassion?

  2. Takafumi Arakaki reporter

    Can't we detect requirements before running pip? Or how about caching setup.py (or compare timestamp or checksum) and reinstall it without --no-deps when it is changed?

  3. Holger Krekel repo owner

    we could probably do a checksum of the setup.py and run a full (no --no-deps) install if it changes. There is no direct general way to just get the install_requires content out of it.

  4. Łukasz Balcerzak

    I would vote against it.

    Passing --recreate flag seems good enough. I often tinker setup.py file without touching deps at all and if I do, I actually know about it most of the time.

  5. Holger Krekel repo owner

    Maybe we could do a "setup.py egg_info" if "setuptools" appears in setup.py and then fish for *.egg-info/requirements.txt to get to know the deps. This would still allow changing other aspects of setup.py without recreating automatically the venv.

  6. Log in to comment