Skip to content

Commit 9e61b4d

Browse files
committed
MAINT: Remove deprecated utility
Remvoe infavor of importlib
1 parent 803b841 commit 9e61b4d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

setup.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@
1010

1111
from collections import defaultdict
1212
import fnmatch
13+
import inspect
1314
import os
14-
from os.path import join as pjoin, relpath
15+
from os.path import dirname, join as pjoin, relpath
1516
from pathlib import Path
1617
import shutil
1718
import sys
1819

19-
import pkg_resources
20-
2120
SETUP_DIR = Path(__file__).parent.resolve()
2221

2322

@@ -224,7 +223,7 @@ def update_extension(extension, requires_math=True):
224223
import numpy as np
225224

226225
numpy_includes = [np.get_include()]
227-
extra_incl = pkg_resources.resource_filename("numpy", "core/include")
226+
extra_incl = pjoin(dirname(inspect.getfile(np.core)), "include")
228227
numpy_includes += [extra_incl]
229228
numpy_includes = list(set(numpy_includes))
230229
numpy_math_libs = {

0 commit comments

Comments
 (0)