summaryrefslogtreecommitdiff
path: root/test cases/python3/3 cython/libdir/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/python3/3 cython/libdir/meson.build')
-rw-r--r--test cases/python3/3 cython/libdir/meson.build23
1 files changed, 23 insertions, 0 deletions
diff --git a/test cases/python3/3 cython/libdir/meson.build b/test cases/python3/3 cython/libdir/meson.build
new file mode 100644
index 000000000..5c0352e88
--- /dev/null
+++ b/test cases/python3/3 cython/libdir/meson.build
@@ -0,0 +1,23 @@
+if host_machine.system() == 'darwin'
+ # Default suffix is 'dylib' but Python does not use for extensions.
+ suffix = 'so'
+elif host_machine.system() == 'windows'
+ # On Windows the extension is pyd for some unexplainable reason.
+ suffix = 'pyd'
+else
+ suffix = []
+endif
+
+pyx_c = custom_target('storer_pyx',
+ output : 'storer_pyx.c',
+ input : 'storer.pyx',
+ command : [cython, '@INPUT@', '-o', '@OUTPUT@'],
+)
+
+slib = shared_library('storer',
+ 'storer.c', pyx_c,
+ name_prefix : '',
+ name_suffix : suffix,
+ dependencies : py3_dep)
+
+pydir = meson.current_build_dir()