summaryrefslogtreecommitdiff
path: root/test cases/cython
AgeCommit message (Collapse)Author
2025-07-18Fix use of a .pxi Cython include file as source from `configure_file`Ralf Gommers
Without adding .pxi` as a known header suffix, the added test will fail with: ``` No specified compiler can handle file stuff.pxi ``` Technically only .pxd are header files, and .pxi are "include files" which are literally included in .pyx files. Adding them as headers seems to be fine though, since they're kinda similar and the point is to avoid treating them as source files.
2025-02-25Add a new test for `override_options: ['cython_language': 'cpp'])`Ralf Gommers
2023-05-05Fix `ERROR: no toolchain found` when run from unittestsRalf Gommers
[skip actions]
2023-05-05Use release buildtype in Cython tests, and skip unless ninja backendRalf Gommers
This matches the tests for Python extensions. Also include some other cleanups to these `meson.build` files: Adding `python_dep` is no longer needed, this is automatic now. Use a single line for `import('python').find_installation()`, because the result of `import('python')` by itself is not used for anything.
2023-02-10cython: add unittest to verify that depfiles workEli Schwartz
2023-01-15BUG: Fix generated sources not being included as dependencies in cython ↵Thomas Li
transpilation
2022-03-23Add support for cython_argsTristan Partin
cython_args was previoously ignored by Meson.
2021-10-04various python neatness cleanupsEli Schwartz
All changes were created by running "pyupgrade --py3-only" and committing the results. Although this has been performed in the past, newer versions of pyupgrade can automatically catch more opportunities, notably list comprehensions can use generators instead, in the following cases: - unpacking into function arguments as function(*generator) - unpacking into assignments of the form x, y = generator - as the argument to some builtin functions such as min/max/sorted Also catch a few creeping cases of new code added using older styles.
2021-09-24Add option to to transpile Cython to C++Dylan Baker
This patch adds a new meson built-in option for cython, allowing it to target C++ instead of C as the intermediate language. This can, of course, be done on a per-target basis using the `override_options` keyword argument, or for the entire project in the project function. There are some things in this patch that are less than ideal. One of them is that we have to add compilers in the build layer, but there isn't a better place to do it because of per target override_options. There's also some design differences between Meson and setuptools, in that Meson only allows options on a per-target rather than a per-file granularity. Fixes #9015
2021-08-03ninjabackend: use get_subdir() instead of subdir attribute for cythonDylan Baker
As this works correctly for CustomTarget, CustomTargetIndex, and GeneratedList, but .subdir doesn't work for CustomTargetIndex.
2021-06-14Fix issue with generated Cython code in a subdirRalf Gommers
This is a follow-up to gh-8706, which contained the initial fix to ninjabackend.py but somehow lost it. This re-applies the fix and adds a test for it. Without the fix, the error is: ninja: error: 'ct2.pyx', needed by 'libdir/ct2.cpython-39-x86_64-linux-gnu.so.p/ct2.pyx.c', missing and no known rule to make it
2021-06-07cython: Add a test for generated filesDylan Baker
2021-06-07cython: add 1 basic testDylan Baker