D14912: Bindings: Make generator forward compatible with Python 3

2018-08-31 Thread Stefan Brüns
This revision was automatically updated to reflect the committed changes. Closed by commit R240:b6e4e645dac6: Bindings: Make generator forward compatible with Python 3 (authored by bruns). REPOSITORY R240 Extra CMake Modules CHANGES SINCE LAST UPDATE

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-31 Thread Antonio Rojas
arojas accepted this revision. This revision is now accepted and ready to land. REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D14912 To: bruns, #frameworks, arojas Cc: arojas, kde-frameworks-devel, kde-buildsystem, michaelh, ngraham, bruns

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-31 Thread Stefan Brüns
bruns added a comment. So, tested on Arch, openSUSE TW and Leap 15.0 ... @arojas - can you accept, also for the two other reviews? REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D14912 To: bruns, #frameworks Cc: arojas, kde-frameworks-devel,

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-26 Thread Antonio Rojas
arojas added a comment. In D14912#315763 , @bruns wrote: > Thats on Arch? Yes REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D14912 To: bruns, #frameworks Cc: arojas, kde-frameworks-devel,

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-26 Thread Stefan Brüns
bruns added a comment. In D14912#315733 , @arojas wrote: > With this + D14914 + D14915 I can successfully compile bindings without having any python2 package installed.

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-26 Thread Antonio Rojas
arojas added a comment. With this + D14914 + D14915 I can successfully compile bindings without having any python2 package installed. REPOSITORY R240 Extra CMake Modules REVISION DETAIL

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-25 Thread Stefan Brüns
bruns added a comment. In D14912#315093 , @arojas wrote: > Python3 still can't be used after this change: python2 is explicitely required at FindPythonModuleGeneration.cmake:177 (and all subsequent calls to sip_generator.py are done with

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-25 Thread Stefan Brüns
bruns added a dependent revision: D14914: Bindings: Use python version matching the found clang python module. REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D14912 To: bruns, #frameworks Cc: arojas, kde-frameworks-devel, kde-buildsystem, michaelh, ngraham,

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-25 Thread Antonio Rojas
arojas added a comment. Python3 still can't be used after this change: python2 is explicitely required at FindPythonModuleGeneration.cmake:177 (and all subsequent calls to sip_generator.py are done with ${GPB_PYTHON2_COMMAND}). This can be adjusted in another review though. REPOSITORY

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-24 Thread Stefan Brüns
bruns updated this revision to Diff 40391. bruns added a comment. rebase REPOSITORY R240 Extra CMake Modules CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D14912?vs=40256=40391 REVISION DETAIL https://phabricator.kde.org/D14912 AFFECTED FILES find-modules/rules_engine.py

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-22 Thread Stefan Brüns
bruns updated this revision to Diff 40256. bruns edited the summary of this revision. bruns removed a subscriber: arojas. bruns added a comment. Use dict.items() for Python 2.7 and Python 3 REPOSITORY R240 Extra CMake Modules CHANGES SINCE LAST UPDATE

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-22 Thread Stefan Brüns
bruns added a comment. Third option: just use `original.items()`. This is slightly more expensive in python 2 (it generates a temporary list instead of passing an iterator), but is functionally identical. I don't think the overhead is an issue here - it is only called when tracing. For

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-18 Thread Stefan Brüns
bruns added a comment. Another option is to include a wrapper function directly in the code, instead of importing it REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D14912 To: bruns, #frameworks Cc: arojas, kde-frameworks-devel, kde-buildsystem,

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-18 Thread Stefan Brüns
bruns added a comment. In D14912#311063 , @arojas wrote: > This adds a new build time dependency to all frameworks which support bindings. Any chance to simply port it to python 3 instead? Dropping python2 means dropping support for any

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-18 Thread Antonio Rojas
arojas added a comment. This adds a new build time dependency to all frameworks which support bindings. Any chance to simply port it to python 3 instead? REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D14912 To: bruns, #frameworks Cc: arojas,

D14912: Bindings: Make generator forward compatible with Python 3

2018-08-17 Thread Stefan Brüns
bruns created this revision. bruns added a reviewer: Frameworks. Herald added projects: Frameworks, Build System. Herald added subscribers: kde-buildsystem, kde-frameworks-devel. bruns requested review of this revision. REVISION SUMMARY iteritems is no longer an available method for dict in