<table><tr><td style="">flherne created this revision.<br />flherne added a reviewer: brauch.<br />flherne set the repository for this revision to R53 KDevelop: Python Support.<br />Restricted Application added a subscriber: kdevelop-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D3804" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>(against the python36 branch, obviously)</p>

<p>Python 3.5 is default on Ubuntu 16.04 LTS and 16.10, Mint 18 and other commonly-used distros, we probably shouldn't drop it yet.</p>

<p>AST nodes in 3.6 seem to be a superset of those in 3.5, and no other changes (discovered so far?) affect kdev-python. Simply skipping the generating code for new AST types will allow compilation against 3.5.</p>

<p>Add a new <tt style="background: #ebebeb; font-size: 13px;">SINCE</tt> directive in python36.sdef, e.g. <tt style="background: #ebebeb; font-size: 13px;">SINCE 3.6</tt>, and make conversionGenerator.py emit #if checks for affected statements.</p>

<p>This can't be used with <tt style="background: #ebebeb; font-size: 13px;">CODE</tt>, because that wasn't needed yet. (:P)</p>

<p>The bundled <tt style="background: #ebebeb; font-size: 13px;">FindPython</tt> CMake module doesn't handle multiple Python versions. Instead use <tt style="background: #ebebeb; font-size: 13px;">FindPythonInterp</tt> and <tt style="background: #ebebeb; font-size: 13px;">FindPythonLibs</tt> from upstream CMake, which (without EXACT) will find newer versions than the one requested; the existing check ensures the version isn't too new.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Compiled against Python 3.5, it builds and seems to work fine.</p>

<p>Didn't actually try 3.6 yet, I don't have it...</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R53 KDevelop: Python Support</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D3804" rel="noreferrer">https://phabricator.kde.org/D3804</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
cmake/modules/FindPython.cmake<br />
cmake/modules/README-FindPython<br />
duchain/helpers.cpp<br />
kdevpythonversion.h.cmake<br />
parser/conversionGenerator.py<br />
parser/generated.h<br />
parser/python36.sdef</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>flherne, brauch<br /><strong>Cc: </strong>kdevelop-devel<br /></div>