[Scons-users] SCons vs Meson for Python projects

Russel Winder russel at winder.org.uk
Fri Nov 25 04:20:00 EST 2016


On Wed, 2016-11-23 at 21:06 +0100, Saša Janiška wrote:
> Dirk Bächle <tshortik at gmx.de> writes:
[…]
> 
> I do not plan to delve into serious/big C(++) projects - only
> extensions
> for Python…Actually, my determination from the very beginning is not
> to
> go (back) to C(++), neither to pursuit Java path although for I’ve
> looked at Kotlin/Ceylon briefly.

C++11, C++14, and now C++17 have some serious problems but also they
make C++ not the problem it was before C++11.

I would not want to write a Python extension in C, nor really Cython –
you have to hack your Python code so much for the C generation that the
code is Cython and not Python, why use a horrible language when C++ is
more honest and therefore easier to get right. If I want performance
Python code I go Numba not Cython – assuming NumPy/SciPy is not good
enough. For real performance though you really need C++, Fortran, D, or
(much more likely) Chapel.

For C++ extensions there is PyBind11 https://github.com/pybind/pybind11
 it is a replacement for the most important bit of Boost.Python and
works very well.

Chapel is the Fortran replacement of the future (as is X10 but I prefer
Chapel). There is a PyChapel but currently it is Python 2 only. :-( I
started trying to port it to Python 3, but had to pause for various
reasons.

Getting SCons and PyChapel on Python 3 is a 2017 goal for me. 

Kotlin (especially) and Ceylon are indeed shaping up to be Java
replacements. Gavin King and his people have done a nice job with
Ceylon, it is a great language, but it's interoperation with extant
Java code is tricky. The JetBrains folk in creating Kotlin as a Java
replacement taking inspiration from Groovy and Scala, and allowing for
incremental replacement of Java code, is a master stroke. I am a Kotlin
convert. Especially now that Gradle has added Kotlin as the language of
build specification as well as Groovy. Kotlin build files may look like
Groovy ones, but they are fully type checked at compile time, unlike
Groovy ones. Lots of errors go away!  

> Afaict, Cython/rst(Sphinx)/PyQt support is not in the SCons' core,
> right?

Cython is handled, and there are Qt tools. There was a move to get RST
and Sphinx support but contributions faded away.

https://bitbucket.org/russel/scons_sphinx
https://bitbucket.org/zondo/sphinx-scons/
https://bitbucket.org/scons/scons/wiki/sphinx4scons


-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20161125/55ef8774/attachment.pgp>


More information about the Scons-users mailing list