-
-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
recreate venv when -rrequire.txt changes #668
Conversation
Codecov Report
@@ Coverage Diff @@
## master #668 +/- ##
===========================================
- Coverage 93.86% 79.14% -14.72%
===========================================
Files 11 10 -1
Lines 2364 2369 +5
===========================================
- Hits 2219 1875 -344
- Misses 145 494 +349
Continue to review full report at Codecov.
|
You may be interested in tox-pip-extensions which attempts to solve this problem more generically (the venv-update extension diffs requirements and gets to a final state by installing/uninstalling) |
Hi @kapilt and @asottile if you both agree that this is a problem worth solving (I definitely also agree :)) and you both already have approaches it would be great if you could put your heads together and tackle that together. This really is something that comes up an awful lot and confuses users who assume that this works properly. I collected all tickets that have to do with that general problem here: https://github.com/tox-dev/tox/projects/9 |
def digest(self): | ||
fname = str(self.name) | ||
if fname.startswith('-r'): | ||
fname = fname[2:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There may be optional whitespace: -r requirements.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, there can be at the moment, but it won't work as expected: it would search for requirements.txt (note space). See PR #669.
You should check for --requirement as well, in which case you will have to strip an =.
A requirements file itself can depend on a requirements file (e.g. dev requirements on install requirements). I guess that is not being checked here?
In lack of activity I'll close this for now, we can reopen it when we come up wit ha common solution. |
This seems to be a long standing fundamental issue with tox, thats been long sidelined by calling -r in deps spec experimental, but given its common usage, one worth correcting given its a common pitfall, and reported numerous times per discussion and refs in #149. i took a look at the suggestions in there of various other tools, but they all had various pitfalls, and also took a look at what some other real world projects are doing with tox (like botocore which does a separate installer script in commands to avoid this pitfall) before deciding the simplest thing was just fixing tox, via checksum on requirements files.