summaryrefslogtreecommitdiff
path: root/numpy/random/examples/cython/setup.py
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2019-11-19 07:44:44 -0700
committerCharles Harris <charlesr.harris@gmail.com>2019-11-19 07:44:44 -0700
commitd6ecf67f88fb61cf641e2370d3e54938232de09d (patch)
tree08223e6b70fd71d0b11d378ca02f96d56c715d74 /numpy/random/examples/cython/setup.py
parent53201578225cc89d383738598acec03572554019 (diff)
downloadnumpy-d6ecf67f88fb61cf641e2370d3e54938232de09d.tar.gz
API: restructure and document numpy.random C-API (#14604)
* API: restructure and document numpy.random C-API * DOC: fix bad reference * API: ship, document, and start to test numpy.random C-API examples * API, DOC, TST: fix tests, refactor documentation to include snippets * BUILD: move public headers to numpy/core/include/numpy/random * TST: ignore DeprecationWarnings in setuptools and numba * DOC: document the C-API as used from Cython
Diffstat (limited to 'numpy/random/examples/cython/setup.py')
-rw-r--r--numpy/random/examples/cython/setup.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/numpy/random/examples/cython/setup.py b/numpy/random/examples/cython/setup.py
index 69f057ed5..315527a2d 100644
--- a/numpy/random/examples/cython/setup.py
+++ b/numpy/random/examples/cython/setup.py
@@ -9,15 +9,20 @@ import numpy as np
from distutils.core import setup
from Cython.Build import cythonize
from setuptools.extension import Extension
-from os.path import join
+from os.path import join, abspath, dirname
+
+curpath = abspath(dirname(__file__))
extending = Extension("extending",
- sources=['extending.pyx'],
- include_dirs=[np.get_include()])
+ sources=[join(curpath, 'extending.pyx')],
+ include_dirs=[
+ np.get_include(),
+ join(curpath, '..', '..')
+ ],
+ )
distributions = Extension("extending_distributions",
- sources=['extending_distributions.pyx',
- join('..', '..', 'src',
- 'distributions', 'distributions.c')],
+ sources=[join(curpath, 'extending_distributions.pyx'),
+ ],
include_dirs=[np.get_include()])
extensions = [extending, distributions]