1""" Exports a no-op 'cython' namespace similar to
2https://github.com/cython/cython/blob/master/Cython/Shadow.py
3
4This allows to optionally compile @cython decorated functions
5(when cython is available at built time), or run the same code
6as pure-python, without runtime dependency on cython module.
7
8We only define the symbols that we use. E.g. see fontTools.cu2qu
9"""
10
11from types import SimpleNamespace
12
13def _empty_decorator(x):
14    return x
15
16compiled = False
17
18for name in ("double", "complex", "int"):
19    globals()[name] = None
20
21for name in ("cfunc", "inline"):
22    globals()[name] = _empty_decorator
23
24locals = lambda **_: _empty_decorator
25returns = lambda _: _empty_decorator
26