aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test cases/python3/2 extmodule/ext/meson.build3
-rw-r--r--test cases/python3/2 extmodule/meson.build5
-rw-r--r--test cases/python3/3 cython/libdir/meson.build11
3 files changed, 18 insertions, 1 deletions
diff --git a/test cases/python3/2 extmodule/ext/meson.build b/test cases/python3/2 extmodule/ext/meson.build
index 04c0592..7d67953 100644
--- a/test cases/python3/2 extmodule/ext/meson.build
+++ b/test cases/python3/2 extmodule/ext/meson.build
@@ -1,6 +1,9 @@
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
diff --git a/test cases/python3/2 extmodule/meson.build b/test cases/python3/2 extmodule/meson.build
index a86a122..858bbea 100644
--- a/test cases/python3/2 extmodule/meson.build
+++ b/test cases/python3/2 extmodule/meson.build
@@ -1,4 +1,7 @@
-project('Python extension module', 'c')
+project('Python extension module', 'c',
+ default_options : ['buildtype=release'])
+# Because Windows Python ships only with optimized libs,
+# we must build this project the same way.
py3_dep = dependency('python3')
diff --git a/test cases/python3/3 cython/libdir/meson.build b/test cases/python3/3 cython/libdir/meson.build
index baa4c1d..5c0352e 100644
--- a/test cases/python3/3 cython/libdir/meson.build
+++ b/test cases/python3/3 cython/libdir/meson.build
@@ -1,3 +1,13 @@
+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',
@@ -7,6 +17,7 @@ pyx_c = custom_target('storer_pyx',
slib = shared_library('storer',
'storer.c', pyx_c,
name_prefix : '',
+ name_suffix : suffix,
dependencies : py3_dep)
pydir = meson.current_build_dir()