Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: random: remove get_info from "extending with Cython" example #22383

Merged
merged 1 commit into from Oct 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 9 additions & 6 deletions numpy/random/_examples/cython/setup.py
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