diff options
Diffstat (limited to 'docs/examples/tutorial/parallelization/setup.py')
-rw-r--r-- | docs/examples/tutorial/parallelization/setup.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/examples/tutorial/parallelization/setup.py b/docs/examples/tutorial/parallelization/setup.py new file mode 100644 index 000000000..eb343e5da --- /dev/null +++ b/docs/examples/tutorial/parallelization/setup.py @@ -0,0 +1,29 @@ +from setuptools import Extension, setup +from Cython.Build import cythonize +import sys + +if sys.platform.startswith("win"): + openmp_arg = '/openmp' +else: + openmp_arg = '-fopenmp' + + +ext_modules = [ + Extension( + "*", + ["*.pyx"], + extra_compile_args=[openmp_arg], + extra_link_args=[openmp_arg], + ), + Extension( + "*", + ["*.pyx"], + extra_compile_args=[openmp_arg], + extra_link_args=[openmp_arg], + ) +] + +setup( + name='parallel-tutorial', + ext_modules=cythonize(ext_modules), +) |