summaryrefslogtreecommitdiff
path: root/numpy/random/_examples/cython/setup.py
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2019-11-19 22:23:00 -0800
committermattip <matti.picus@gmail.com>2019-11-19 22:23:00 -0800
commit521ea22552297345680c426c0204b17b644e6bd0 (patch)
tree883cc4a161230acc71692c71ff5fc69a98ffed35 /numpy/random/_examples/cython/setup.py
parent7d75171c4e6fbb2ed0aebda10908a6a0b01d0c7e (diff)
downloadnumpy-521ea22552297345680c426c0204b17b644e6bd0.tar.gz
MAINT: move numpy/random/examples -> numpy/random/_examples
Diffstat (limited to 'numpy/random/_examples/cython/setup.py')
-rw-r--r--numpy/random/_examples/cython/setup.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/numpy/random/_examples/cython/setup.py b/numpy/random/_examples/cython/setup.py
new file mode 100644
index 000000000..315527a2d
--- /dev/null
+++ b/numpy/random/_examples/cython/setup.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python3
+"""
+Build the demos
+
+Usage: python setup.py build_ext -i
+"""
+
+import numpy as np
+from distutils.core import setup
+from Cython.Build import cythonize
+from setuptools.extension import Extension
+from os.path import join, abspath, dirname
+
+curpath = abspath(dirname(__file__))
+
+extending = Extension("extending",
+ sources=[join(curpath, 'extending.pyx')],
+ include_dirs=[
+ np.get_include(),
+ join(curpath, '..', '..')
+ ],
+ )
+distributions = Extension("extending_distributions",
+ sources=[join(curpath, 'extending_distributions.pyx'),
+ ],
+ include_dirs=[np.get_include()])
+
+extensions = [extending, distributions]
+
+setup(
+ ext_modules=cythonize(extensions)
+)