summaryrefslogtreecommitdiff
path: root/numpy/random/_examples/cython/setup.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2019-11-20 13:39:02 -0700
committerGitHub <noreply@github.com>2019-11-20 13:39:02 -0700
commitd428127183d46b2fbd99afefa4670642addf8d6e (patch)
tree692114515b9752d6c9817922976429cdb1105405 /numpy/random/_examples/cython/setup.py
parent9ec8474b13d73a9da3febf35ef35f7b55138772d (diff)
parentf3fde3c4d0acba41122a6d87c0315064579fad6a (diff)
downloadnumpy-d428127183d46b2fbd99afefa4670642addf8d6e.tar.gz
Merge pull request #14944 from mattip/move-examples
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)
+)