msg281882 - (view) |
Author: Florin Papa (florin.papa) * |
Date: 2016-11-28 16:22 |
Hello, This is Florin Papa from the Dynamic Scripting Languages Optimizations team in Intel Corporation. In changeset 105360:46e2755b022c [1] the generate_opcode_h.py script was modified to use tokenize.open() in order to avoid a Resource Warning. The tokenize module does not have an 'open' attribute in python2, therefore the build will crash if python3 is not present on the system. The patch attached checks if the tokenize module has the 'open' attribute. If it does, the current implementation will be used. Otherwise, it will fall back to the old implementation. Thank you, Florin [1] https://hg.python.org/cpython/rev/46e2755b022c |
|
|
msg281895 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2016-11-28 17:15 |
I don't understand why do you run Tools/scripts/generate_opcode_h.py. It seems like Makefile wants to run it if Lib/opcode.py is more recent than Include/opcode.h. Can you please try the "make touch" command to not recompile Include/opcode.h? Include/opcode.h is already up to date. |
|
|
msg281896 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2016-11-28 17:16 |
New changeset a6ea34c8b413 by Victor Stinner in branch 'default': Reintroduce Python2 support in generate_opcode_h.py https://hg.python.org/cpython/rev/a6ea34c8b413 |
|
|
msg281897 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2016-11-28 17:19 |
Anyway, I reintroduced the Python 2, just for practical reasons :-) I knew that my change dropped Python 2 support, but I didn't notice that the Makefile might have to run the script to be able to build the ./python binary. So the script can be used on python2. |
|
|
msg281959 - (view) |
Author: Florin Papa (florin.papa) * |
Date: 2016-11-29 07:52 |
Whenever I did a fresh clone, the Tools/scripts/generate_opcode_h.py would be called. Thank you for fixing this. |
|
|
msg281963 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2016-11-29 08:02 |
> Whenever I did a fresh clone, the Tools/scripts/generate_opcode_h.py would be called. Can you please test "make touch"? This command "fixes" timestamps. |
|
|
msg281964 - (view) |
Author: Florin Papa (florin.papa) * |
Date: 2016-11-29 08:07 |
I tested and the script is no longer called if you do a "make touch" beforehand. |
|
|
msg281965 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2016-11-29 08:13 |
Florin Papa added the comment: > I tested and the script is no longer called if you do a "make touch" beforehand. Oh ok, thanks for the test. It confirms that you don't need to run the script to build Python 3. It's a side effect of the Mercurial clone. |
|
|