Fix web2py compile and race condition bugs#2272
Fix web2py compile and race condition bugs#2272knewmanTE merged 3 commits intoTechEmpower:masterfrom abastardi:master
Conversation
Also add some clarifying comments.
frameworks/Python/web2py/setup.sh
Outdated
| cp app/routes.py web2py/ | ||
| touch web2py/__init__.py | ||
| python compile_apps.py | ||
| $PY2_ROOT/bin/python compile_apps.py |
There was a problem hiding this comment.
This line, while correct, should be unnecessary. The fw_depends python2 above executes this file which ensures that $PY2_ROOT/bin is the first entry on the PATH, which should mean that python is functionally equivalent to $PY2_ROOT/bin/python under these conditions.
If this is not the case, then we have a bigger bug at play that needs to be addressed.
Specifically, I expect this change to have no effect.
There was a problem hiding this comment.
Good point. I suppose that line isn't really necessary. I guess I was just thinking better safe (and explicit) than sorry. Do you want to revert that change or just leave it as is?
There was a problem hiding this comment.
I think that it would be better to revert.
My only reason for this is to maintain the same simple code across the python codebases for when contributors pick one at random to reference.
There was a problem hiding this comment.
OK, done. Thanks.
It is not necessary to specify the Python version in setup.sh, as this is handled earlier via `fw_depends python2`
Ensure web2py applications are compiled with the same version of Python used to execute the tests. Also, update web2py to a more recent commit from "master" in order to take advantage of a fix for a possible framework-level race condition (which occurred once during a test run of the benchmarks).
Also includes some clarifying comments in the code.