Cython as a first class language in Meson

 Today some work I've been considering doing for a long time, but finally got around to, landed and will be available in Meson 0.59.0: cython as a first class language.

This means starting with meson 0.59.0 You'll be able to write:


project('mypackage', 'cython', meson_version : '>= 0.59.0')

py = import('py').find_installation('python3').

py.extension_module(
  'mypackage',
  ['mypackage.pyx', 'lib/other.pyx', 'lib/in_c.c'],
  dependencies : py.dependency(),
  install : true
)

with no extra generators of custom_targets involved. You can even mix C and cython together like this and Meson should do the right thing automatically. This was made possibly by the people who worked on Vala support in Meson (which works very similarly to cython, transpiling a higher level language to C for compilation by your C compiler), and both upstream cython developers and the people at SciPy for testing and finding bugs.

Comments

Popular posts from this blog

This Weekend in Meson++ (February 6th)

Introducing Meson++

Rust in Meson — 0.57 Edition