summaryrefslogtreecommitdiff
path: root/docs/examples/userguide/parallelism/setup_pyx.py
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/userguide/parallelism/setup_pyx.py')
-rw-r--r--docs/examples/userguide/parallelism/setup_pyx.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/examples/userguide/parallelism/setup_pyx.py b/docs/examples/userguide/parallelism/setup_pyx.py
new file mode 100644
index 000000000..fe6d0a64c
--- /dev/null
+++ b/docs/examples/userguide/parallelism/setup_pyx.py
@@ -0,0 +1,16 @@
+from setuptools import Extension, setup
+from Cython.Build import cythonize
+
+ext_modules = [
+ Extension(
+ "hello",
+ ["hello.pyx"],
+ extra_compile_args=['-fopenmp'],
+ extra_link_args=['-fopenmp'],
+ )
+]
+
+setup(
+ name='hello-parallel-world',
+ ext_modules=cythonize(ext_modules),
+)