[Differential] [Request, 278 lines] D3804: Restore compile-time support for Python 3.5
flherne (Francis Herne)
noreply at phabricator.kde.org
Fri Dec 23 19:21:05 UTC 2016
flherne created this revision.
flherne added a reviewer: brauch.
flherne set the repository for this revision to R53 KDevelop: Python Support.
Restricted Application added a subscriber: kdevelop-devel.
REVISION SUMMARY
(against the python36 branch, obviously)
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.
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.
Add a new `SINCE` directive in python36.sdef, e.g. `SINCE 3.6`, and make conversionGenerator.py emit #if checks for affected statements.
This can't be used with `CODE`, because that wasn't needed yet. (:P)
The bundled `FindPython` CMake module doesn't handle multiple Python versions. Instead use `FindPythonInterp` and `FindPythonLibs` from upstream CMake, which (without EXACT) will find newer versions than the one requested; the existing check ensures the version isn't too new.
TEST PLAN
Compiled against Python 3.5, it builds and seems to work fine.
Didn't actually try 3.6 yet, I don't have it...
REPOSITORY
R53 KDevelop: Python Support
REVISION DETAIL
https://phabricator.kde.org/D3804
AFFECTED FILES
CMakeLists.txt
cmake/modules/FindPython.cmake
cmake/modules/README-FindPython
duchain/helpers.cpp
kdevpythonversion.h.cmake
parser/conversionGenerator.py
parser/generated.h
parser/python36.sdef
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: flherne, brauch
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20161223/944e4c85/attachment.html>
More information about the KDevelop-devel
mailing list