Skip to content

Commit

Permalink
Use importlib.resources
Browse files Browse the repository at this point in the history
  • Loading branch information
sjperkins committed Jan 30, 2024
1 parent 17250d0 commit 12ab506
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions africanus/util/nvcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import ast
import contextlib
import importlib.resources
import logging
import os
import re
Expand All @@ -12,7 +13,6 @@
import tempfile

from os.path import join as pjoin
from pkg_resources import resource_filename

import distutils
from distutils import errors
Expand Down Expand Up @@ -486,8 +486,8 @@ def compile_using_nvcc(source, options=None, arch=None, filename="kern.cu"):

options += ["-cubin"]

cupy_path = resource_filename("cupy", pjoin("core", "include"))
settings["include_dirs"].append(cupy_path)
cupy_path = importlib.resources.files("cupy") / "core" / "include"
settings["include_dirs"].append(str(cupy_path))

with _tempdir() as tmpdir:
tmpfile = pjoin(tmpdir, filename)
Expand Down

0 comments on commit 12ab506

Please sign in to comment.