Skip to content

Commit

Permalink
Merge pull request numpy#22245 from rgommers/doc-getinfo
Browse files Browse the repository at this point in the history
MAINT: random: remove `get_info` from "extending with Cython" example
  • Loading branch information
charris authored Sep 11, 2022
2 parents 151c184 + 8c0e2bc commit 8dfe9e2
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions numpy/random/_examples/cython/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@
Usage: python setup.py build_ext -i
"""
import setuptools # triggers monkeypatching distutils
from distutils.core import setup
from os.path import dirname, join, abspath

from setuptools import setup
from setuptools.extension import Extension

import numpy as np
from Cython.Build import cythonize
from numpy.distutils.misc_util import get_info
from setuptools.extension import Extension


path = dirname(__file__)
src_dir = join(dirname(path), '..', 'src')
defs = [('NPY_NO_DEPRECATED_API', 0)]
inc_path = np.get_include()
lib_path = [abspath(join(np.get_include(), '..', '..', 'random', 'lib'))]
lib_path += get_info('npymath')['library_dirs']
# Add paths for npyrandom and npymath libraries:
lib_path = [
abspath(join(np.get_include(), '..', '..', 'random', 'lib')),
abspath(join(np.get_include(), '..', 'lib'))
]

extending = Extension("extending",
sources=[join('.', 'extending.pyx')],
Expand Down

0 comments on commit 8dfe9e2

Please sign in to comment.