WIP:Build superkaramba with Python3. #38
zavřený
Ghost
chce sloučit 1 commity z větve fix/issue#37
do master
Načítá se…
Odkázat v novém úkolu
Není zde žádný obsah.
Smazat větev „fix/issue#37“
Smazání větve je trvalé. NEMŮŽE být vráceno zpět. Pokračovat?
Some more work is needed since this solution works only if Python3 is installed with cmake >= 3.12.
If both Python2/3 are installed, cmake defaults to Python3, no ideas of the build actually succeeds (didn't push the test further yet).
This should not be compatible with cmake-2.8.12 either.
Superkaramba lunches, does Python stuff work? => no ideas.
Note: For compatibility with older versions of CMake, you can look for inspiration in tdeedu.
I'm leaning toward a Python3 build exclusive since you've told me that Python3 is been available in Deb/Ubunt for the oldest distros you package.
That being said, cmake2/3 compatibility should still be adressed, to be continued...
Good idea, also because we will have to move away from python 2 as some point.
As a side note to this PR, I'd like you guys to consider rising minimal cmake version once more (like we did with cmake >= 2.8 to cmake >= 2.8.12)
The oldest version provided by Ubuntu-16.04 is cmake-3.5.1, Debian Etch is cmake-3.7.1, cmake3-3.17.1 is available for Centos7 through EPEL (EPEL stuff is mandatory for rpms btw).
I suggest we rise cmake to 3.5
In this PR the solution works only with cmake >= 3.12, but this is typical kind of thing I have to check each time I work on a cmake conversion.
I have my version of cmake installed from my distrib, once the work is well advanced I have to go online to read the doc for cmake-2.8.12 and check if that version provides the same features (modules search) with the same syntax, sometime I even install cmake-2.8.12 if I'm not sure.
In short, this is extra work and quite annoying.
We had in the past to stick with cmake-2.8 but now we can move on cmake-3.5
Sounds good for me, now that jessie and trusty will no longer be built. Likewise we can also move to c++11 standard, something I am planning to work on early next year.
As for deb packaging, there is currently no obstacle to update the minimum version to 3.5. However, there is no visible benefit at the moment, which would bring it. The mentioned change in Python detection relates to CMake 3.12, so it will still require code supporting CMake versions < 3.12. We can wait for the update until it will bring benefit or it will be necessary?
I guess the ultimate decision is up to you Slavek. I am in favour of the update, but I know where you are coming from and I know it will make more difficult building on older distros if we need it. So final decision is up to you as far as I am concern.
You know very well that nothing is necessary "per-se" because everything can be done with tweaking and tinkering based on what is already available. It requires more work only...
If there is no drawback moving up, using the last tool is commun sense.
Every new CMake version brings new modules detection or update those available, here is a diff between version 2.8.12 and 3.5:
Here, the new detection for Ice and Intl might come in handy, I also noticed there's a better detection of Ruby (Remember the tinkering to get Ruby's version?).
I don't remember which version, but there's also a better detection with OpenSSL where crypt and SSL are separated, better detection of OpenMP with Clang, etc.
That kind of reasoning could be applied to C++11 too you know; to date, compilers are still compliant with C++98...
Making Python3 the default build for SuperKaramba involes looking for compatibility between Python2 and Python3, testing applets and/or themes but I don't wish to spend so much time on this testing and search so I'm closing this PR.
Great, the list of new modules was very useful, it's a good stimulus, thank you!