Skip to content

Commit 8dfe9e2

Browse files
authored
Merge pull request numpy#22245 from rgommers/doc-getinfo
MAINT: random: remove `get_info` from "extending with Cython" example
2 parents 151c184 + 8c0e2bc commit 8dfe9e2

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

numpy/random/_examples/cython/setup.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,24 @@
44
55
Usage: python setup.py build_ext -i
66
"""
7-
import setuptools # triggers monkeypatching distutils
8-
from distutils.core import setup
97
from os.path import dirname, join, abspath
108

9+
from setuptools import setup
10+
from setuptools.extension import Extension
11+
1112
import numpy as np
1213
from Cython.Build import cythonize
13-
from numpy.distutils.misc_util import get_info
14-
from setuptools.extension import Extension
14+
1515

1616
path = dirname(__file__)
1717
src_dir = join(dirname(path), '..', 'src')
1818
defs = [('NPY_NO_DEPRECATED_API', 0)]
1919
inc_path = np.get_include()
20-
lib_path = [abspath(join(np.get_include(), '..', '..', 'random', 'lib'))]
21-
lib_path += get_info('npymath')['library_dirs']
20+
# Add paths for npyrandom and npymath libraries:
21+
lib_path = [
22+
abspath(join(np.get_include(), '..', '..', 'random', 'lib')),
23+
abspath(join(np.get_include(), '..', 'lib'))
24+
]
2225

2326
extending = Extension("extending",
2427
sources=[join('.', 'extending.pyx')],

0 commit comments

Comments
 (0)