From e744cab8d5f8d86f32efcefc043cae482e45430d Mon Sep 17 00:00:00 2001 From: yikwill Date: Thu, 19 Mar 2026 14:09:40 -0700 Subject: [PATCH] Removes pkg_resources dependency Signed-off-by: yikwill --- cuhpx/sht_tools.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cuhpx/sht_tools.py b/cuhpx/sht_tools.py index 8534801..2a5d2e1 100644 --- a/cuhpx/sht_tools.py +++ b/cuhpx/sht_tools.py @@ -13,10 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +import importlib.resources import os import numpy as np -import pkg_resources import torch from astropy.io import fits @@ -26,8 +26,7 @@ def get_datapath(): global DATAPATH if DATAPATH is None: - # Using pkg_resources to ensure the path is correctly resolved for installed packages - DATAPATH = pkg_resources.resource_filename('cuhpx', 'data') + DATAPATH = importlib.resources.files('cuhpx').joinpath('data') return DATAPATH