Skip to content
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

[FIX] packaging: avoid jinja2 asyncsupport in py2exe #32913

Closed
wants to merge 1 commit into from

Conversation

d-fence
Copy link
Contributor

@d-fence d-fence commented Apr 24, 2019

Since 78ba90d, when building the windows package, py2exe fails to
compile jinja2 asyncsupport module. Even tough jinja detects the
environement, py2exe tries to compile the async part. The problem comes
from the fact that async keyword was introduced in python 3 and we use
py2exe with python 2.7.

With this commit the async part of jinja is execluded from py2exe.

@d-fence
Copy link
Contributor Author

d-fence commented Apr 24, 2019

I think that it should fix the build problem.
Jinja2 tests if the python version have the async possibilities:
https://github.com/pallets/jinja/blob/c4c4088945a2c12535f539be7f5453b9ca94666c/jinja2/utils.py#L638-L643

So the compiled exe should be able to run without the assyncsupport.
I tested with a small script and it worked.

@C3POdoo C3POdoo added the RD research & development, internal work label Apr 24, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Apr 24, 2019
Copy link
Contributor

@odony odony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok, but I assume we'll want to revert this change after 11.0? This should perhaps be indicated in a comment in the code and in the commit message, so it is indeed discarded during forward-ports.

@d-fence
Copy link
Contributor Author

d-fence commented Apr 25, 2019

As 11.0 does not use py2exe, I already removed the py2exe code here : 055e1b8
But a small comment does not cost anything.

Since 78ba90d, when building the windows package, py2exe fails to
compiles jinja2 asyncsupport module. Even tough jinja detects the
environement, py2exe tries to compile the async part. The problem comes
from the fact that async keyword was introduced in python 3 and we use
py2exe with python 2.7.

With this commit the async part of jinja is execluded from py2exe.
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Apr 25, 2019
Copy link
Contributor

@odony odony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As 11.0 does not use py2exe, I already removed the py2exe code here : 055e1b8

Oh that's right, then it was perhaps not necessary. Though we have an interim forward-porter, so it may possibly help him ;-) And thanks for the nice commit message!

@robodoo r+ either way

robodoo pushed a commit that referenced this pull request Apr 25, 2019
Since 78ba90d, when building the windows package, py2exe fails to
compiles jinja2 asyncsupport module. Even tough jinja detects the
environement, py2exe tries to compile the async part. The problem comes
from the fact that async keyword was introduced in python 3 and we use
py2exe with python 2.7.

With this commit the async part of jinja is execluded from py2exe.

closes #32913

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
@robodoo robodoo added merging 👷 and removed r+ 👌 CI 🤖 Robodoo has seen passing statuses labels Apr 25, 2019
@robodoo
Copy link
Contributor

robodoo commented Apr 25, 2019

Staging failed: ci/runbot on 31bc88f82275ecb1519bacf9f2fdd432e7ebb9b8 (view more at http://runbot.odoo.com/runbot/build/507469)

@d-fence
Copy link
Contributor Author

d-fence commented Apr 25, 2019

@robodoo retry

@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses r+ 👌 and removed error 🙅 labels Apr 25, 2019
@robodoo
Copy link
Contributor

robodoo commented Apr 25, 2019

Merged, thanks!

@robodoo robodoo closed this Apr 25, 2019
@fw-bot fw-bot deleted the 10.0-fix-jinja2-p2exe-moc branch October 19, 2019 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants