* Add an integration test with the meson backend * Modify script to allow testing of the GHA action on a PR * Try adding cython to languages in meson config * Revert "Try adding cython to languages in meson config" This reverts commit 50378a1c7e38665492ad0c683b178e4d96928e1e. * Pass --vsenv to meson on windows As seen here https://github.com/matplotlib/matplotlib/blob/9957c394bd01deb7a9bd9cb27804f447a52dc522/.github/workflows/cibuildwheel.yml#L114 * Disable win32 builds for the meson test * Move the windows-specific config into the test project definition This is so it can be tested with bin/run_example_ci_configs.py * Add some docs to the FAQ about meson on windows * Update bin/run_example_ci_configs.py Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com> --------- Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
38 lines
816 B
Python
38 lines
816 B
Python
SPAM_C_TEMPLATE = r"""
|
|
#include <Python.h>
|
|
|
|
{{ spam_c_top_level_add }}
|
|
|
|
static PyObject *
|
|
spam_filter(PyObject *self, PyObject *args)
|
|
{
|
|
const char *content;
|
|
int sts;
|
|
|
|
if (!PyArg_ParseTuple(args, "s", &content))
|
|
return NULL;
|
|
|
|
// Spam should not be allowed through the filter.
|
|
sts = strcmp(content, "spam") != 0;
|
|
|
|
{{ spam_c_function_add | indent(4) }}
|
|
|
|
return PyLong_FromLong(sts);
|
|
}
|
|
|
|
/* Module initialization */
|
|
static PyMethodDef module_methods[] = {
|
|
{"filter", (PyCFunction)spam_filter, METH_VARARGS,
|
|
"Execute a shell command."},
|
|
{NULL} /* Sentinel */
|
|
};
|
|
|
|
PyMODINIT_FUNC PyInit_spam(void)
|
|
{
|
|
static struct PyModuleDef moduledef = {
|
|
PyModuleDef_HEAD_INIT, "spam", "Example module", -1, module_methods,
|
|
};
|
|
return PyModule_Create(&moduledef);
|
|
}
|
|
"""
|